What is Robots.txt File? SEO Friendly Robots.txt Create

Let’s learn about What is Robots.txt File seo, robots.txt generator, robots.txt disallow all, robots.txt google, robots.txt vulnerability, robots.txt wordpress, robots.txt syntax.

If you do blogging, then it is very important for you to be aware of this important file, otherwise knowingly or unknowingly it can cause a lot of damage to your site. Which URL of your site will be indexed in Search Engine or not depends largely on Robots.txt file.

If you make some mistake while creating or updating this important file, then your entire site may be removed from the search engine or the content which you do not want to be shown to the search engine may also be indexed.

In today’s post, we are going to give you information about this topic that what is Robots.txt file in Blogging? And what is its importance and how is a Perfect Robots.txt file created? If you read this post carefully, then by the end you must have understood well about this term of blogging.

What is Robots.txt File?

What is Robots.txt File ? Robots.txt file is a .txt file located in the Root Folder of your site’s web hosting which helps to guide Search Engine Bots that whenever bots come to my site, they should search which URL of the site. Which URL is to be indexed to show in Engine and which URL is not to be indexed. You can check this TXT file of any site through https://example.com/robots.txt.

Robots.txt file manages the indexing rules of the site in a way within which different rules can be created for different file paths. Each rule prevents or allows crawlers to crawl a particular file path.

It is also very important to keep this file in the right place because if you keep it separate from the root directory of the website, then perhaps Search Engines Crawlers may find it difficult to find it which is not correct at all.

Whenever the Crawlers of any search engine come to crawl your website, they first target the Robots.txt file in the root directory of the website to find out which URLs are there in this site which are not to be indexed and Which URLs are free for indexing?

Therefore it becomes very important to have this important file inside every website so that all Search Engines like Google, Bing etc. can get the right guidelines for crawling and only that content is publicly visible in the search engine which you have given permission. Huh.

What are the Advantages of Robots.txt File?

1. Robots.txt file instructs Search Engine Crawlers which part of the site to crawl and which not?
2. With the help of this file, you can index and noindex your blog according to the category in the search engine.
3. It helps Search Engines to quickly understand the indexing structure of your blog.
4. Through this file, you can prevent any entire search engine from indexing the blog.
5. Sometimes there is some content that you do not want to be visible to Search Engines, but if there is no Robots.txt file then everything gets indexed immediately. In such a situation, if you want, you can also delay the indexing of the blog with the help of this file.
6. In this file, you can also add the URL of the Sitemap, with the help of which the indexable content of the blog helps in fast indexing because Crawlers first target the Robots.txt file.

Why is Robots.txt File Important in SEO?

According to the information given above, now you must have understood that what is the Robots.txt File in the website? And what are its advantages? Let us now tell you why this type of txt file is important for SEO of the site? This file is a very important part of Technical SEO for any site, so it is very important to understand it from the point of view of SEO.

If you want to make your site SEO Friendly according to Search Engine, then make sure to create a Robots.txt file for this so that Crawlers can get proper guidelines to crawl the right content of your site.

By the way, if seen manually, Search Engine Crawlers take some time to crawl the content of any site. But when you submit a Sitemap to Google Search Console, crawling happens very quickly in that situation.

But if you have not configured the Robots.txt file for your site, then the entire content will be indexed in the search engine, which will also contain content that you did not want to be visible in the search results. Which is not at all suitable for site SEO, so it becomes very important to keep a Robots.txt file for every website.

Where should the Robots.txt file be located?

If you are a WordPress website user then ideally the place of Robots.txt file should be in the root directory of your site so that whenever the crawlers come to the site, they can easily access this file and crawl the content according to its guidelines.

But if you keep this important file somewhere different from the root directory of the site, then the crawlers will not be able to access it and your entire site will be indexed in the search engine completely. If a site has a Robots.txt file, you can access it through this URL: https://example.com/robots.txt

Now a text file will open in front of you as you can see in the image below. This is the Robots.txt file of Aitechtonic.com. If 404 error is displayed after entering this URL, then it means that there is no Robots.txt file available inside your site.

And if a code like the code given below appears, it means that this file remains for the website but that Robots.txt file has not been optimized according to SEO.

User-agent: *
Crawl-Delay: 10

Important Guidelines related to Robots.txt File

1. User-agent

This command is used to instruct Search Engine Bots/Crawlers for crawling which may contain one or more user-agents such as *, Googlebot, AdsBot-Google, Bingbot etc. (Here if you use * it means that you are giving permission to all crawlers). Let us understand this through an example:

Example 1: To block Googlebot.

User-agent: Googlebot
Disallow: /

Example 2: To block Googlebot and Adsbot.

User-agent: Googlebot
User-agent: AdsBot-Google
Disallow: /

Example 3: To allow all Search Crawlers for Crawling.

User-agent: *
Allow: /

2. Disallow

These commands are used to not allow search engine bots to crawl. You can also see the use of this command in the examples given above.

3. Allow

This command is used to allow search engine bots to crawl.

4. Sitemap

Here you can mention the URL of the Sitemap of your site so that Crawlers can easily find whatever content you want to crawl.

How to Create Robotos.txt File for WordPress? Manually

As you must have already known that Robots.txt is a simple text file. So it is very easy to prepare this file for your site. For this you can use any text editor like Notepad, Notepad++ etc.

  • Open any one of the text editors and then create a blank file named robots.txt.
  • Now sign-in to the hosting’s web server through your favorite Ftp tool or your web hosting’s cPanel.
  • After signing in, open the public_html folder or whatever is the root folder of your site and upload the text file you just created in this folder.
  • By the way, if you want, you can also create Robots.txt file directly in your Ftp Server or cPanel (Root Folder), in which you will not even need to use any text editor.
  • For this, after going to the Root Folder of your site, click on File in the Top Left Corner. Now in whatever dialog box will open, type robots.txt and click on Create New File.
  • On clicking OK, you will see that a text file is created by the name of robots.txt.

Before proceeding, you must set the Right Permissions for this file. Such as Owner Permissions, Group Permissions and Public Permissions. For this, after right clicking on this file, select Change Permissions and then you can follow the image given below. (Also check carefully that the numeric value should be 644).

How To Use Robots.txt File?

Now a Robots.txt file has been created for your site but it is still an Empty file. You will know in this post about what guidelines you can give to Crawlers for the content of the site inside this file.

For example, if you want to block the Crawling of Search Engines for your site, then just add some permissions inside Robots.txt.

If you want to hide any particular page of your site from Crawlers, then you can easily do that too.

Although Robots.txt itself does not improve the SEO of your site, but the use of this file is very important to control the behavior of Search Engine Crawling.

To modify this file or for any kind of editing, simply open it after going to your Ftp Editor or cPanel and the changes you make inside the file are instantly effective in your site.

1. Block all bots for the site.

If you want to block all crawlers for crawling then add this code inside Robots.txt file.

User-agent: *
Disallow: /

This code should look something like this inside your Actual Robots.txt file as you can see in the image below.

2. Blocking Crawler’s Crawling for a particular folder.

If you want that Crawlers cannot access any particular folder of your site, then add the following code inside the file.

User-agent: *
Disallow: /write_folder_name/

If you want that no Crawlers can crawl the folder containing the images of your site for Search Engine, this code should be added to your Actual File in such a way as you can see in the image below.

Note: Here the folder containing /images has been taken only as an example, it is not necessary that you also have to block your /images folder for Search Engines Bots, it may also be different in your case. For whichever folder you want to do this task, add the name of the same folder with this code.

3. Blocking any specific Search Engine Bots.

If you want to block which particular Search Engine Bot such as Googlebot or Bingbot from your site, then you should use this code:

User-agent: robot name
Disallow: /

For example, if you want to block Bingbot, then add the above code inside the Robots.txt file as shown in the image below.

4. Preventing any specific file from being crawling.

The Robots.txt file also allows you to prevent the file of a specific folder from being crawling in the search engines. For this you should add the below code to that file.

User-agent: *
Disallow: /folder_name/file_name.extension

This code should be added to your Robots.txt file as you can see in the image below.

5. Blocking the entire folder but allowing only one file.

Sometimes there may be such a condition that you do not want to allow any folder to be crawling, but if you want to allow any one file inside the same folder for search engine crawling, then you can also easily through Robots.txt file. can do from For this use the following code.

User-agent: *
Disallow: /folder_name/
Allow: /folder_name/file_name.extension

For example, if you want to block the folder named “images” of your site but want to give access to the file named “img_0001.png” present in that folder, then this code inside your actual file.

How to Create Robots.txt File by RankMath SEO?

With the help of RankMath SEO WordPress Plugin, you can create Robots.txt File in Admin Area of ​​your WordPress Dashboard only. This is the fastest and easiest way to create this file.

To create an SEO Friendly Robots.txt through Rank Math SEO, first you must have Rank Math Plugin installed inside your WordPress. After this click on Rank Math->General Settings->Edit robots.txt. Now some such interface comes in front of you as you can see in the image below.

Here below is the coding of the Robots.txt file I have created for myself, if you want, you can copy and paste it in Rank Math and if you want to make it yourself, then type it and click on Save Changes below. .

User-agent: *
Disallow: /cgi-bin/
Disallow: /wp-admin/
Disallow: /comments/feed/
Disallow: /wp-content/plugins/
Disallow: /wp-content/themes/
Disallow: /feed/
Disallow: */feed/
Disallow: /trackback/
Disallow: /index.php
Disallow: /xmlrpc.php
Allow: /wp-includes/js/
Allow: /wp-includes/css/
Allow: /wp-content/cache/minify/
Allow: /wp-admin/admin-ajax.php
User-agent: Googlebot-Image
Allow: /wp-content/uploads/

User-agent: Adsbot-Google
Allow: /

User-agent: Googlebot-Mobile
Allow: /

User-agent: Bingbot
Allow: /

Sitemap: https://example.com/sitemap.xml
sitemap: https:// example.com/post-sitemap.xml
sitemap: https:// example.com/page-sitemap.xml

As soon as you click on Save Changes, an SEO Friendly Robots.txt File will have been created for your site. Yoursitename.com/robots.txt’s Help Sage, once you must check that whatever coding you wrote is becoming visible or not?

Read more article here:


In this important post, we told you what is Robots.txt file? Why should you use it for your site? How to Create Robots.txt File for Website? If you have read this post carefully then you must have understood all this very well.

Leave a Comment