Reputation: 35
Google has indexed my non-SEF urls as well as SEF urls for no reason. The site has always had SEF urls set to ON.
How do I force a 301 redirection on non-SEF url, so it never displays, without actually writing 301's in the .htaccess for every new page I make?
Upvotes: 2
Views: 1030
Reputation: 11
Google did the same thing to me on my joomla website !
It always had sef ON, but it indexed non sef urls, leaving me in great troubles, as the structure of my database and my IDs changed, Google is now calling non sef urls that do not refer to anything any more, generating tons and tons of 500 errors.
As long as the structure was the same, google calling non sef urls, wasn't ideal (duplicate content A LOT) ; but at least it worked and had a proper page displaying.
But now that the structure changed (Ids changed), non sef urls are not referring to anything any more and all it's displaying is 500 errors. Crazy.
This is exactly as if google is indexing my website before urls are rewritten !
I more or less managed to get back on my feet. I got back to my old ids (incredible work).
But I'm afraid you'll have to redirect manually, as :
-SH404sef can't redirect non-sef urls
-Google seems to crawl joomla websites before their urls are sef
I advise you to have a look at php redirect. This is how we got rid of some 500 errors. I believe you can do the same to redirect your pages as php redirect seems more powerful to manage bulks of urls with conditions.
Upvotes: 1
Reputation: 509
I'm not sure as to the exact workings of that module, but either way I'd advise canonical tags. If you've got a page like:
www.example.com/category/sef-url-1
and Google is also indexing (the same page, but with non-SEF URL):
www.example.com?=adfgdfsg
(or whatever your non-SEF structure is), then place a canonical tag with the clean URLs in the of each offending page.
So in the above example, if you drop the following into the template of www.example.com?=adfgdfsg, and this also appears in the "clean" URL, then Google (and other major engines) will realise that one is a duplicate of another.
More info on canonical tags here:
http://support.google.com/webmasters/bin/answer.py?hl=en&answer=139394
This will eventually (~2 months) drop all of the non-SEF urls out of the index.
Upvotes: 1