I have important URLs on my site to which I’d like to append temporary parameters. For example:
example.com/tool/input
will have the parameter
example.com/tool/input?foo
input
in the URL is dynamic.
Although example.com/tool
and example.com/tool/input
are important URLs on the site, I do not want Google to crawl or index the URLs with the parameters.
So what I think I want to do is to add a robots
meta
tag to the pages with parameters, AND add the following robots.txt directive:
User-agent: *
Disallow: /*?foo
Would this be the best way to treat the URLs, or is there something I'm missing that might be better?
User-agent
, notUseragent
, and empty lines aren’t allowed within a record.