Do search engines crawl links with query strings?

The question:

If I were to have a url like, that contained several links to urls such as:

Would search engines crawl and index the content returned by these URLs? If not, what would happen if I were to use a rewrite rule in my .htaccess file to rewrite pretty urls to ugly ones with query strings: -> -> ->

Would there be any difference/preference? Or would a search engine crawl both?

The Solutions:

Below are the methods you can try. The first solution is probably the best. Try others if the first one doesn’t work. Senior developers aren’t just copying/pasting – they read the methods carefully & apply them wisely to each case.

Method 1

Yes. Query strings are part of the URL and as such are viewed as directing the robots to different pages.

There may be a preference to using a path because then Google can test the parent. So if you have:

Google will eventually test

on its own (it could be that they don’t do it anymore though, but I’m sure I read that somewhere on a page owned by Google.)

One thing for sure, if you allow both, make sure to add a canonical meta tag with your preferred URL otherwise you could get penalized because of the duplication.

All methods was sourced from or, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

Leave a Comment