Prohibit indexing the Robots Txt site

"Learn how to block search engine bots from indexing your website using robots.txt with a practical example."

Prohibiting indexing with Robots.txt

To prohibit indexing of a website, it is necessary to create a robots.txt file and place it in the root directory of the website. This file helps search engine crawlers to understand which parts of the website to index or not. It lists the instructions on what should be indexed or not. Here is an example of a robots.txt that prohibits indexing of a website:


User-agent: *
Disallow: /

The above code means that any search engine crawler, identified by the User-agent: * line, should not index any page on the website, as indicated by the Disallow: / line. The / symbol indicates that all pages under the root directory should not be indexed.

It is important to note that the instructions provided in the robots.txt file are only guidelines and search engine crawlers may choose to ignore them. Therefore, it is important to also use other methods, such as the noindex meta tag, to ensure that the website is not indexed by search engines.

Answers (0)