Redirects from crapy to good url

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.
Locked
jonBuckner1
Joomla! Explorer
Joomla! Explorer
Posts: 428
Joined: Mon Nov 12, 2012 9:08 am

Redirects from crapy to good url

Post by jonBuckner1 » Thu Mar 07, 2019 4:15 am

Hi folks

I am hoping someone can pass on some links to good info regarding redirects or any kind of solution to this:
I did a google search of a page on my site:

Code: Select all

fretroom people get ready
and I ended up with this [crappy link]

Code: Select all

https://fretroom.com.au/component/content/article/11-lesson-files/1426-people-get-ready?Itemid=107
I was hoping for this [good link]

Code: Select all

https://fretroom.com.au/lesson-files/people-get-ready
I have a menu item, which is a Seblod List & Search:

Code: Select all

https://fretroom.com.au/lesson-files
These list items link to this like so:

Code: Select all

https://fretroom.com.au/lesson-files/people-get-ready
I am wondering why google picked up on the crappy link, rather than the good link.
The good link is to be found on pages within the site.
The crappy link doe snot appear anywhere...
Any tips or suggestions?
Do I need to create a SINGLE ARTICLE MENU ITEM for each article to guarantee good links, or would this still not suffice?


Thanks :D

annahersh
Joomla! Guru
Joomla! Guru
Posts: 734
Joined: Wed Aug 15, 2018 8:23 pm

Re: Redirects from crapy to good url

Post by annahersh » Thu Mar 07, 2019 4:52 am

What are other search engines returning? (yes believe it or not, there are other search sites)

You will need to create a google web master account and clear the cache. It's quite tedious but it's worth the task. You could also enable Joomla redirection plugin and set some instruction in the redirection component.

jonBuckner1
Joomla! Explorer
Joomla! Explorer
Posts: 428
Joined: Mon Nov 12, 2012 9:08 am

Re: Redirects from crapy to good url

Post by jonBuckner1 » Thu Mar 07, 2019 5:53 am

Hi

Thanks for interest...

Other search engines:
- Ecosia: pulls in all sorts of stuff, nothing to do with me
- Google: pulls in all sorts of stuff, nothing to do with me (except crappy link)
- Bing: Pulls in good link, first item, first page


"You will need to create a google web master account and clear the cache"
I have that and upon a search it is suggested to resubmit sitemap, which I have done... (the sitemap will not have pages for most articles listed, only a select few i.e "/about-us" type pages)

"You could also enable Joomla redirection plugin and set some instruction in the redirection component"
I do not really understand this one, does the redirect component pull in redirects from .htaccess?
If not, where are they from?
Every time I create an article do I need to do a redirect?

Thanks

jonBuckner1
Joomla! Explorer
Joomla! Explorer
Posts: 428
Joined: Mon Nov 12, 2012 9:08 am

Re: Redirects from crapy to good url

Post by jonBuckner1 » Thu Mar 07, 2019 6:00 am

It seems a few other pages are found by Google 'correctly', and some aren't... and the age of the article does not correlate to being found 'correctly'.

annahersh
Joomla! Guru
Joomla! Guru
Posts: 734
Joined: Wed Aug 15, 2018 8:23 pm

Re: Redirects from crapy to good url

Post by annahersh » Thu Mar 07, 2019 6:39 am

The redirection components is at Components > Redirect and it requires the redirect plugin to be enabled.

You would create a new entry and add the bad URL to the Expired URL field and add the good URL in the New URL field. Overtime a short period Google should clear its cache and replace with the good URL.
redirect-component.jpg
You do not have the required permissions to view the files attached to this post.

jonBuckner1
Joomla! Explorer
Joomla! Explorer
Posts: 428
Joined: Mon Nov 12, 2012 9:08 am

Re: Redirects from crapy to good url

Post by jonBuckner1 » Thu Mar 07, 2019 9:04 am

damn, I see what you mean by tedious.

One question then:
If I was to make single article menu item for each article, would the problem disappear over time, or would I still need to do as you directed in previous reply?

The reason I ask is that I can make menu items dynamically if required, I will create a plugin for myself that does it...Seeing as I have a lot of articles I might run a script to create the redirects anyway, hmmm

delacroix1505
Joomla! Apprentice
Joomla! Apprentice
Posts: 12
Joined: Fri Jul 20, 2018 1:51 am

Re: Redirects from crapy to good url

Post by delacroix1505 » Thu Mar 07, 2019 10:57 am

Related to this question, I have found an old thread that similar to your problem: viewtopic.php?t=924499

As I understand that they use sitemap to prevent the problem first hand. I don't sure that if that could work. And I have another question about this issue too:
Does submit the URL to Google Search Engine can prevent Google from indexing crappy link like your example?

jonBuckner1
Joomla! Explorer
Joomla! Explorer
Posts: 428
Joined: Mon Nov 12, 2012 9:08 am

Re: Redirects from crapy to good url

Post by jonBuckner1 » Thu Mar 07, 2019 2:53 pm

for me, google has my site map. has done for a while now... and... used to search fine ie non-crappy results.
I did have some redirects but they were old and not relevant to this example.

I think i will create menu items for each article rather than muck around with redirects as that seems like i am trying to trick the system. if i have menu items in the first place then all should be good, right?

annahersh
Joomla! Guru
Joomla! Guru
Posts: 734
Joined: Wed Aug 15, 2018 8:23 pm

Re: Redirects from crapy to good url

Post by annahersh » Thu Mar 07, 2019 8:25 pm

jonBuckner1 wrote:
Thu Mar 07, 2019 2:53 pm
I think i will create menu items for each article rather than muck around with redirects as that seems like i am trying to trick the system. if i have menu items in the first place then all should be good, right?
The redirection component does 301 (permanent) redirects so it's not tricking the system. It's literally instructing the search engines to use this new address and please abandon that old address. It's tantamount to manually clearing the search engine cache.

jonBuckner1
Joomla! Explorer
Joomla! Explorer
Posts: 428
Joined: Mon Nov 12, 2012 9:08 am

Re: Redirects from crapy to good url

Post by jonBuckner1 » Thu Mar 07, 2019 11:00 pm

But if I had menu item pointing to the article i would not need a redirect?

I suppose I am asking if a redirect is a step that you shouldn’t beed to implement if you had the link right in the first place, and the way to get it right in the first place is to have a menu item point to rhe article?

It seems to me that either a menu item ‘step’ or a redirect ‘step’ is necessary either way
Thanks :)

annahersh
Joomla! Guru
Joomla! Guru
Posts: 734
Joined: Wed Aug 15, 2018 8:23 pm

Re: Redirects from crapy to good url

Post by annahersh » Fri Mar 08, 2019 1:01 am

The concept of 301 redirect is to avoid 404 failures due to bad URLs. Simply creating new menu items will not correct the cached URLs, if that's your desire.

jonBuckner1
Joomla! Explorer
Joomla! Explorer
Posts: 428
Joined: Mon Nov 12, 2012 9:08 am

Re: Redirects from crapy to good url

Post by jonBuckner1 » Fri Mar 08, 2019 9:02 am

I think you inderstand a lot and me not so much ...

Where did the crappy url come from, how do i avoid it for every single article?

That is my thought right now and then that takes me to ‘get it right in the first place’.... so if a single article menu item will not resolve it then you are only left with a redirect for every single article on the off chance that google might snag a crappy url rather than good one...

do you see where I’m coming from?

Is there nothing within joomla that protects you from dishing out crappy urls?

What do you do/use to prevent any crappy urls getting out there or do you do redirects for every article?

annahersh
Joomla! Guru
Joomla! Guru
Posts: 734
Joined: Wed Aug 15, 2018 8:23 pm

Re: Redirects from crapy to good url

Post by annahersh » Fri Mar 08, 2019 8:14 pm

The search bots scan text and follow links and each pass is cached. All Joomla pages have multiple URLs when SEF is enabled

example
Menu item 132 goes to yoursite.com/great-article
The same page is accessible via url yoursite.com/component/content/article/221
Also at yoursite.com/index.php?option=com_content&view=article&id=221&itemid=132

Currently the method to avoid multiple urls being found and cached is to write some complex .htaccess instruction or use a redirection extension, most common is sh404sef. However the bots don't generally find the non SEF urls unless the site owner inadvertently added links with a bad url, or that the site was left in non-sef mode for an extended period, now those URLs are cached. That's possibly the case you're in.

There are probably just a few bad URLs cached from your website, but the only way to know is to get into your Googly account and check the cache. Always be aware of the links you post, and ensure they convert correctly in the rendered page.

neiljames54
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 145
Joined: Tue Jan 03, 2012 1:02 pm

Re: Redirects from crapy to good url

Post by neiljames54 » Sat Mar 09, 2019 12:33 pm

This problem you have is a running sore for me, If you check my posts you will see I have asked and been given no answer why this is, in fact some responders get quite cranky about this type of complaint. It seems Joomla the cms are quite relaxed about this url mess, I have had my seo numbers devastated because google are indexing false urls I know they are false because they do not exist but for some reason joomla allows them to be made up for example this url https://mygolfdays.com/21-inverness-shire does not exist anywhere on my site however is has been made up to show a menu item listing the category items. What is the response from Joomla NOTHING. It makes me quite angry that in this day and age of very bright and intelligent minds ( sadly I am not one of these ) that the Joomla heirarchy cannot take ownership of this problem and fix it. If you do like I have done and scour the internet you will see there has been many questions on how to fix because we are not the only ones asking but no one is listening. There thats my tuppence worth !!.

annahersh
Joomla! Guru
Joomla! Guru
Posts: 734
Joined: Wed Aug 15, 2018 8:23 pm

Re: Redirects from crapy to good url

Post by annahersh » Sat Mar 09, 2019 8:43 pm

neiljames54 wrote:
Sat Mar 09, 2019 12:33 pm
for example this url https://mygolfdays.com/21-inverness-shire does not exist anywhere on my site
That's interesting. I've never had that issue but I do see that even the url https://mygolfdays.com/23 and any other numerical value used, does return a valid document, most likely assigned to the ID. When I try that with my site it correctly returns the error page.

I will try to replicate that result just to see why it occurs.

neiljames54
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 145
Joined: Tue Jan 03, 2012 1:02 pm

Re: Redirects from crapy to good url

Post by neiljames54 » Sun Mar 10, 2019 3:38 pm

Yep the number refers to a category eg: the number 21 is the category for Inverness shire and the 23 is the category number for midlothian. Myquestion has been why is google indexing my site using category numbers, attached is a screen shot og the google url remover showing all the recent attempts by me to get rid of these
joomlaURL.jpg
You do not have the required permissions to view the files attached to this post.

neiljames54
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 145
Joined: Tue Jan 03, 2012 1:02 pm

Re: Redirects from crapy to good url

Post by neiljames54 » Sun Mar 10, 2019 3:57 pm

I have just changed categories to no index/nofollow for the robots in the categories/publishing tab. Will see how that works, maybe I was wrong by not have set this accordingly in the first place

annahersh
Joomla! Guru
Joomla! Guru
Posts: 734
Joined: Wed Aug 15, 2018 8:23 pm

Re: Redirects from crapy to good url

Post by annahersh » Mon Mar 11, 2019 5:15 am

neiljames54 wrote:
Sun Mar 10, 2019 3:38 pm
Yep the number refers to a category eg: the number 21 is the category
I was able to replicate the issue and the same occurred for me so I figured 2 methods to eradicate the "bad url", though both are simply 301 redirection to the home page. With more complex coding including database query, the redirection could be more relative by returning the category landing page of each ID found in the URL.

.htaccess
See https://perishablepress.com/redirecting-urls-numbers/ for more fine tuning

Code: Select all

# redirect to home page if number is found in URL
<IfModule mod_alias.c>
  RedirectMatch 301 [0-9] /
</IfModule>
PHP within template's index.php

Code: Select all

// redirect to home page if number is found in URL string, immediately following a forward slash
if( preg_match('#\/\d+#', JURI::getInstance()->toString()) )
    JFactory::getApplication()->redirect('/');

jonBuckner1
Joomla! Explorer
Joomla! Explorer
Posts: 428
Joined: Mon Nov 12, 2012 9:08 am

Re: Redirects from crapy to good url

Post by jonBuckner1 » Mon Mar 11, 2019 1:26 pm

nice

thanks annahersh

not sure where google cache is (apart from on my browser), i assume you are referring to webmaster area....

It seems that you just have to ride your luck and when you discover the crappy url is out there just deal with it.

Can’t think what i have changed...

thanks for the help and info


Locked

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