1

Some sources say to use # before the parameters in URL, others recommend using #! or !#...

So, if I'm using category filters on a page, to add parameters to URLs and sort items based on price, color or size, the ways to block them from indexing are known: noindex meta tags, disallowing in robots.txt, canonical tags pointing to original pages.

But if hashtag in URL is another proven method, what is the correct way of using it?

  • http://example.com/page#?size=1&price=2&color=3&page=4
  • http://example.com/page!#?size=1&price=2&color=3&page=4
  • http://example.com/page#!?size=1&price=2&color=3&page=4

Are any of these URLs correct for this purpose? Or which is the correct URL syntax solution?

  • 1
    Is your site a JavaScript/AJAX driven site? – MrWhite Jul 9 '15 at 13:08
  • @w3d nope, but my site has lots of different get parameters in URLs and I'm trying all possible ways of avoiding their indexations – CamSpy Jul 10 '15 at 7:08
1

The fragment identifier (ie. everything after the #) is not sent to the server, so unless you are using JavaScript/AJAX then your server won't be able to process these as URL parameters. (?)

So, using a hash (#) would not seem to be a solution in your case as it simply won't work - unless I'm missing something?

What's wrong with using a rel="canonical" and/or robots.txt? I'd be wary of using a noindex meta tag for fear of the parent page not being indexed (but maybe that's just me?). You can also tell Google in GWT/Search Console to ignore specific URL parameters when indexing - but that's just Google.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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