By using robots.txt
, you can disallow crawling.
By using meta
-robots
(or the HTTP header X-Robots-Tag
), you can disallow indexing.
If you intend to forbid indexing, you shouldn’t disallow the URLs in robots.txt, otherwise bots will never know that you don’t want these URLs to be indexed.
In case you want to disallow crawling, you could use this robots.txt:
User-agent: *
Disallow: /REF-123
This would apply to all URLs whose paths start with REF-123
(case-sensitive!).
In case you want to disallow indexing, you could add to all these pages this meta
element
<meta name="robots" content="noindex">
or send the corresponding HTTP header X-Robots-Tag
:
X-Robots-Tag: noindex
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…