How to prevent search engines from indexing a single page of my website?

前端 未结 7 401
抹茶落季
抹茶落季 2020-12-08 14:13

I don\'t want the search engines to index my imprint page. How could I do that?

相关标签:
7条回答
  • 2020-12-08 14:55

    You need a simple robots.txt file. Basically, it's a text file that tells search engines not to index particular pages.
    You don't need to include it in the header of your page; as long as it's in the root directory of your website it will be picked up by crawlers.
    Create it in the root folder of your website and put the following text in:

    User-Agent: *
    Disallow: /imprint-page.htm
    

    Note that you'd replace imprint-page.html in the example with the actual name of the page (or the directory) that you wish to keep from being indexed.

    That's it! If you want to get more advanced, you can check out here, here, or here for a lot more info. Also, you can find free tools online that will generate a robots.txt file for you (for example, here).

    0 讨论(0)
提交回复
热议问题