How to add `nofollow, noindex` all pages in robots.txt?

ⅰ亾dé卋堺 提交于 2019-11-29 14:31:57

noindex and nofollow means you do not want your site to crawl in search engine.

so simply put code in robots.txt User-agent: * Disallow: /

it means noindex and nofollow.

There is a non-standard Noindex field, which Google (and likely no other consumer) supported as experimental feature.

Following the robots.txt specification, you can’t disallow indexing nor following links with robots.txt.

For a site that is still in development, has not been indexed yet, and doesn’t get backlinks from pages which may be crawled, using robots.txt should be sufficient:

# no bot may crawl 
User-agent: *
Disallow: /

If pages from the site are already indexed, and/or if other pages which may be crawled link to it, you have to use noindex, which can not only be specified in the HTML, but also as HTTP header:

X-Robots-Tag: noindex, nofollow
  • Noindex tells search engines not to include pages in search results, but can follow links (and also can transfer PA and DA)
  • Nofollow tells bots not to follow the links. We also can combine noindex with follow in pages we don´t want to be indexed, but we want to follow the links
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!