tag for Google

后端 未结 4 1762
时光取名叫无心
时光取名叫无心 2020-12-30 00:13

I would like to tell Google not to index certain parts of the page. In Yandex (russian SE) there\'s a very useful tag called . How can it be done

4条回答
  •  长情又很酷
    2020-12-30 01:06

    Create a robots.txt file at your root level and insert something like the following:

    Block Google:

    User-agent: Googlebot
    Disallow: /myDisallowedDir1/
    Disallow: /myDisallowedPage.html
    Disallow: /myDisallowedDir2/
    

    Block all bots:

    User-agent: *
    Disallow: /myDisallowedDir1/
    Disallow: /myDisallowedPage.html
    Disallow: /myDisallowedDir2/
    

    A handy robots.txt generator:

    http://www.mcanerin.com/EN/search-engine/robots-txt.asp

提交回复
热议问题