This article is for beginners who only recently began to explore the creation and promotion of websites. If you have used Wordpress CMS before then you must be knowing something about robot.txt. Robot.txt file can be used with any kind of websites and blog. So here you can learn about how to create robot.txt file and some of its basic commands and directives.
What is Robots.txt
Robots.txt is an important element of each website on Internet. Robots.txt is useful in raising the rankings of site and SEO traffic. Robots.txt is a special file which is majorly present in the root of many sites which contains the different rules of indexing used by search engines.
It is always accepted as a name "robots.txt". The main tasks of robot.txt is to block indexing certain pages, show where the sitemap file is and to specify the locations of the mirror site. Robots.txt also helps to avoid leakage of sensitive data of your website.
Why we need Robots.txt
Incorrect use of robots.txt file may lead to non-indexing of website by search engines. If you don't use it properly you may end up indexing junk data, also your sensitive data may be available to your customers and a wide range of people. If you want to check your robot.txt file you can use the services such Yandex.Webmaster robots.txt Analysis tool.
Learn about the other search engines apart from google
Basic commands in Robots.txt
To create a robots.txt file you don't need any specialized programs. We just need a text editor and some definitive codes or instructions to enter in the robot.txt file. After the creation of robot.txt file you have to place it in the root directory of the website. After that search engines crawls the site and begin indexing .
Disallow and User-agent commands
Disallow command specifies that page mentioned should not be indexed and User-agent command actually refer to the search engine crawlers. Creating a robots.txt file is rarely complete without Allow directive, which is the opposite of Disallow. They both defines what part or page should be indexed and which shouldn't.
In the example above we are defining User-agent: * which simply refers to all types of crawlers and bots indexing the site. The next line Disallow: / means NO crawlers should index the whole website.
The above code means crawler shouldn't index the wp-admin and trackback folders of the website.
Link building techniques in SEO - Strategy and tips
Additional commands in Robots.txt
- Host - It detects the presence of your site of the primary mirror, if there are several.
- Sitemap - This command shows the search engine position of your site map.
- Crawl -delay - It is used to create a delay before loading the page. This command is only useful for sites with many pages. For example: Crawl-delay: 10 - creates delay between the loading of pages is 10 seconds.
- Request-rate - It allows you to set the frequency of loading pages. For example: Request-rate: 1/2 load one page in every two seconds.
- Visit-time - This command allow the crawler to index only in a strictly allotted time to UTC.
Example 4: Wordpress robot.txt