Joomla Redirecting site/blog/article to site/article... How to Stop?

Discuss Search Engine Optimization in relation to Joomla! 3.x. This forum will also have discussions on SEF/SEO Joomla! 3.x extensions.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10.
Post Reply
Alex W
Joomla! Apprentice
Joomla! Apprentice
Posts: 20
Joined: Wed Jan 13, 2016 4:05 am

Joomla Redirecting site/blog/article to site/article... How to Stop?

Post by Alex W » Wed Oct 14, 2020 2:11 pm

Starting a little under two weeks ago I noticed that Google indexed an additional ~18 URLs that it didn't have before (Increased from 79 to 97). Looking at the list of URLs, I see that it has picked up all of my blog articles which should be (and until recently were) wilhelmraceworks.com/blog/suspension-improvements (for example) and indexed them as wilhelmraceworks.com/suspension-improvements (omitting the /blog from the path).

The old URL still works if you enter it manually, but clicking through the menu on my site Joomla will not take me to that page, it only takes me to the version without the /blog included. This wouldn't be a big deal except that I have some modules turned off on the blog menu item, which should turn them off on all of the articles in that category (it used to). But Joomla is now ignoring the fact that all of these articles are categorized as blog items.

Did something change in a recent update that could be causing this?

waarnemer
Joomla! Hero
Joomla! Hero
Posts: 2780
Joined: Sun May 04, 2008 12:37 pm

Re: Joomla Redirecting site/blog/article to site/article... How to Stop?

Post by waarnemer » Sat Oct 17, 2020 8:53 am

check this:

https://wilhelmraceworks.com/suspension-improvements

when crawling throught the source code I find this somewhere:

<link href="/wilhelmraceworks.com/blog/suspension-improvements" rel="canonical">

Somewhere in your template or some SEO/SEF extension is putting it there.. it will happen on all your articles I assume.

Alex W
Joomla! Apprentice
Joomla! Apprentice
Posts: 20
Joined: Wed Jan 13, 2016 4:05 am

Re: Joomla Redirecting site/blog/article to site/article... How to Stop?

Post by Alex W » Sat Oct 17, 2020 1:01 pm

waarnemer wrote:
Sat Oct 17, 2020 8:53 am
check this:

https://wilhelmraceworks.com/suspension-improvements

when crawling throught the source code I find this somewhere:

<link href="/wilhelmraceworks.com/blog/suspension-improvements" rel="canonical">

Somewhere in your template or some SEO/SEF extension is putting it there.. it will happen on all your articles I assume.
Yes, I manually added that to a couple of pages just recently to see if it would cause google to index the correct version of the link (note that it includes the /blog/ portion of the path. It hasn't been long enough for it to impact the google index, but it certainly hasn't caused the Joomla menu system to behave correctly (not that I thought it would).

waarnemer
Joomla! Hero
Joomla! Hero
Posts: 2780
Joined: Sun May 04, 2008 12:37 pm

Re: Joomla Redirecting site/blog/article to site/article... How to Stop?

Post by waarnemer » Sat Oct 17, 2020 3:03 pm

I see.. I was checkin on one of mine.. In my site it appears the category is omitted in the url when a category is used on a blog category page that is default landing page..

Maybe someone can confirm?

Alex W
Joomla! Apprentice
Joomla! Apprentice
Posts: 20
Joined: Wed Jan 13, 2016 4:05 am

Re: Joomla Redirecting site/blog/article to site/article... How to Stop?

Post by Alex W » Sat Oct 17, 2020 4:02 pm

Hmm, interesting. I do have my home page setup as a category blog as it was the easiest way to get it to display two "introductory" blog posts and keep all of the formatting consistent. Then I have another category blog for the actual blog. So that my well be the issue. I made that change probably 6 months ago, but it's possible that I didn't notice at the time that it effected the path to all of the blog posts. However I think it's also possible that a recent updated changed something, as I'm pretty sure it wasn't doing this until recently, and like I said all of a sudden google has indexed all of these additional pages, and that just happened in the last couple of weeks.

Alex W
Joomla! Apprentice
Joomla! Apprentice
Posts: 20
Joined: Wed Jan 13, 2016 4:05 am

Re: Joomla Redirecting site/blog/article to site/article... How to Stop?

Post by Alex W » Mon Oct 19, 2020 5:35 pm

I temporarily switched my home page from a category blog menu item to a single article, and the rest of the blog links went back to having /blog/ in the URL. So that is the root cause.

Regardless, is there any way to get it to include the category in these URLs without redoing the home page?

I know I could setup a custom redirect for each blog post, but that seems like a lot of effort and a little clunky. And then for each new post I have to add a redirect.

waarnemer
Joomla! Hero
Joomla! Hero
Posts: 2780
Joined: Sun May 04, 2008 12:37 pm

Re: Joomla Redirecting site/blog/article to site/article... How to Stop?

Post by waarnemer » Mon Oct 19, 2020 6:45 pm

Either use "featured articles" or maybe create an override to "blog articles" in your template maybe.. though I did not investigate that option.

Alex W
Joomla! Apprentice
Joomla! Apprentice
Posts: 20
Joined: Wed Jan 13, 2016 4:05 am

Re: Joomla Redirecting site/blog/article to site/article... How to Stop?

Post by Alex W » Mon Oct 19, 2020 9:52 pm

I'm already using a featured article for the main home page intro (that is categorized as a blog post even though it really isn't). The home page blog is set to show featured articles and show them first, so that post shows first always. Then the following two posts are shown by publish date, so those change automatically as new content is posted. The actual blog that is accessed via the menu is set to NOT show featured articles, so the home page intro doesn't appear there. All in all it works pretty slick except for the URL issue.

I can't say for certain that it hasn't always been like this, but I am pretty sure that when I first set it up this way ~6 months ago the URLs still had the categories in them.

Honestly the URL is the least of my worries. The annoying thing is I have certain modules turned off on the blog menu item (the slide show modules on the home page), and in the past that would apply to things linked from within that menu item. But with the way it's working now, it doesn't. And I have no other way to turn those modules off in the blog, since none of the blog posts actually appear in any menu, so they don't appear in the menu assignment tab of the module. Technically it seems that those modules SHOULD be off in blog posts anyway, as they are set to appear only in a few selected menu items, but it seems to be completely ignoring that when it comes to the blog...

waarnemer
Joomla! Hero
Joomla! Hero
Posts: 2780
Joined: Sun May 04, 2008 12:37 pm

Re: Joomla Redirecting site/blog/article to site/article... How to Stop?

Post by waarnemer » Tue Oct 20, 2020 7:35 am

Aha.. you say you have blog posts that have a category that have no menu item to that category?

As when there is no menu item to the category there is also no routing available.
You can turn off/on modules on a menu item... so you need a menu item -> category -> articles to have this work..including the routing.

Alex W
Joomla! Apprentice
Joomla! Apprentice
Posts: 20
Joined: Wed Jan 13, 2016 4:05 am

Re: Joomla Redirecting site/blog/article to site/article... How to Stop?

Post by Alex W » Tue Oct 20, 2020 1:05 pm

No, I have a menu item to the category. wilhelmraceworks.com/blog is the category blog module that lists all articles in the blog category. What I don't have is a menu item that specifically links directly to each individual article within the blog category. They are accessible only by clicking through the category blog (or by the URL of course).

The problem is I ALSO have my home page set as a category blog module in order to display the most recent two posts. If I turn the home page off (ie set it to a single article instead), the blog works fine.

I could create a hidden menu for all of the blog articles so that I could turn off certain modules on those articles, but then for each article I have to add it to the menu and it's an extra step. Not that I write a new article THAT often, but it seems to defeat the purpose of having a nice automated module like the category blog if you also have to do all this manual stuff.

waarnemer
Joomla! Hero
Joomla! Hero
Posts: 2780
Joined: Sun May 04, 2008 12:37 pm

Re: Joomla Redirecting site/blog/article to site/article... How to Stop?

Post by waarnemer » Tue Oct 20, 2020 2:18 pm

Ok, my bad for not quit grasping the problem... I did have the same issue in the past though..
If I am correct,
What I did...

Made "uncategorized" the parent of all categories.

the landing page set to "category blog" menu item.
selected "uncategorized" as category.

now the urls in the landing page are showing the category too.

You can check some like that on https://cadet.nl/nl/
(stick to the Dutch pages as the English is just a small cap of information for sailors outside the Netherlands)
This is a category blog to "uncategorized". Showing all featured in "uncategorized" including the subcategorie(s).. in this case "nieuws".
Of course there still is the need for a menu or menu item. I have a dummy menu setup for that with the menu items (category blog) hidden...

Alex W
Joomla! Apprentice
Joomla! Apprentice
Posts: 20
Joined: Wed Jan 13, 2016 4:05 am

Re: Joomla Redirecting site/blog/article to site/article... How to Stop?

Post by Alex W » Tue Oct 20, 2020 5:04 pm

Brilliant, that worked perfectly.

I have a few articles "uncategoriezed", so I just made a new "home" category, and made "blog" a subcategory of "home". Then set the home page article to the new category, and set the category blog for the home page to "home" with one level of subcategories shown (so that the two most recent blog posts will appear). Works exactly like I wanted it to. Thanks!


Post Reply

Return to “Search Engine Optimization (Joomla! SEO) in Joomla! 3.x”