3

I've noticed one bot in particular in our log files that rearranges query parameters when scanning our website. This got me thinking. Does allowing rearranging of query parameters trigger duplicate content penalties with legitimate bots? Because technically, there could be multiple urls that result in identical content because of this. Example:

https://example.com?te=one&tr=two&page=1
https://example.com?tr=two&te=one=page=1
https://example.com?page=1&te=one&tr=two
https://example.com?page=1&tr=two&te=one
https://example.com?te=one&page=1&tr=two
https://example.com?tr=two&page=1&te=one

Obviously this could go further depending on how many query parameters exist. I have a little script that disallows rearranging of query parameters (it issues a 404 if they enter query parameters in the wrong order). I'm just not sure if I should be using that script to issue a 404, or doing a 301 pointing to the correct order url, or using canonical tags pointing to the correct order url.

Thanks, Todd

1

2 Answers 2

3

With regards to duplicate content, as long as the correct canonical tag is set to match the original page, it should be fine.

In saying that, it's definitely not optimal to have duplicate pages with exactly the same content on them, and then rely on the canonical tag to get you out of trouble with the duplicate content.

With regards to the redirect question, if the page URL (with or without the query parameter) doesn't really exist, then it should go to a 404 page. The last thing you want is loads of internal 301's for no reason. The less 301's you have on your site the better.

(And if you're worried about the visitor experience going straight to a 404, then just implement a site map or menu on your 404 page to help the visitor choose where to go).

But it also sounds like a bit of a unique case with your query parameters. So you could implement a wildcard redirect in htaccess if those URLs should all definitely resolve to that single page etc.

1

In short, if not managed, yes. Google give a good overview of the issues and solutions, including the canonical link element.

The other issue to consider here is crawl efficiency. That is, if a bot is crawling virtually limitless combinations and permutations of parameters, it may be doing so at the expense of crawling valuable, unique pages. This is normally managed with robots.txt. This introduction from Google is a good starting point.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.