http - Is there any advantage of using X-Robot-Tag instead of robots.txt? -
it looks there 2 mainstream solutions instructing crawlers index , not index: adding x-robot-tag http header, or indicating robots.txt.
is there advantage using former?
with robots.txt
cannot disallow indexing of documents.
they have different purposes:
robots.txt
can disallow crawling (withdisallow
)x-robots-tag
¹ can disallow indexing (withnoindex
)
(and both offer additional different features, e.g., linking sitemap in robots.txt
, disallowing following links in x-robots-tag
, , many more.)
crawling means accessing document. indexing means providing link (and possibly metadata or about) document in index. in typical case, bot indexes document after having crawled it, that’s not necessary.
a bot isn’t allowed crawl document may still index (without ever accessing it). bot isn’t allowed index document may still crawl it. you can’t disallow both.
¹ note header called x-robots-tag
, not x-robot-tag
. way, metadata name robots
(for html meta
element) alternative http header.
Comments
Post a Comment