2

I want to disallow all URLs with a certain query parameter in array format.

For example I have this kind of URL:

https://example.com/site/?param[index]=1&param[index2]=5

and I do not want all crawlers to crawl site with param parameter in all array variations.

Second question: Is it possible to disallow only if certain array parameter occurs? For instance, param[index3]? (I do not need it, but it could be useful for other people)

unor
  • 92,415
  • 26
  • 211
  • 360
Tom
  • 61
  • 6
  • Is it always the path `/site/`? Are there other parameters than `param`? Are the `param` parameters always at first position, directly after the `?`? – unor May 10 '19 at 13:57

1 Answers1

0

The robots.txt syntax doesn't support this.

The closest you can get would be to add <meta name="ROBOTS" content="NOINDEX"> to any page with that parameter in the query string.

Quentin
  • 914,110
  • 126
  • 1,211
  • 1,335