Are you a WordPress blogger or a site owner who would like to implement the perfect SEO (Search Engine Optimization) and drive organic traffic from search engines?
I assume that you are familiar with the factors that help your site content rank on the top of Google and other search engines.
However, if you want to perform even better, then you should know about robots.txt file for WordPress and how to configure it correctly!
There are many misconceptions about this file!
If you are new to WordPress or unaware of generating robots.txt, you might puzzle with the questions,
What is robots.txt file in WordPress?
What does robots.txt do? What is its use?
What is robots.txt optimization?
How to create robots txt WordPress file?
How to check robots.txt to know the errors and warnings? And so on.
Let me tell you all the essential details of robots.txt file in this post so that you will come to know its importance and advantages.
What is robots.txt File?
Robots.txt file is the simple text file that gets uploaded to the root directory of the server.
It acts a mediator between your site and the search engines to tell, which part of your site should get crawled by search engines and which part shouldn’t!
In simple words, it contains the rules for bots where to go and where to not go on your site.
Robots.txt file should be configured correctly; Otherwise, it would harm your site and wouldn’t let your site appear on search engines.
But, you never need to worry about creating this simple text file; it’s not a rocket science!
You have just to do it correctly!
Is It Essential To Generate robots.txt WordPress?
You might ask me, Is it necessary to create this simple file for your site?
What is robots.txt used for?
Well, let me tell you the exact answer for your questions!
WordPress has a default virtual robots.txt file and thus the search engines can crawl and index all your files.
However, to make the things easier, you may stop the search engine crawling to your particular files like wp-admin, wp-content, and trackbacks as these files are only for your users.
By doing so would,
- Speed up the crawling process and help the search spiders to crawl the inner pages of your site as well.
- Save the bandwidth and make your site load fast.
- Protect your sensitive data from bad bots and offers good security.
- Avoid duplicate content issues and aid you to get high search engine rankings.
Thus, I would recommend you to generate robots.txt file for WordPress sites.
You may create and upload the file to your root directory or public_html folder of your WordPress site.
Here is a video tutorial to do it.
How To Edit robots.txt For WordPress?
If you aren’t a tech-savvy person, it’s better to edit the robots.txt through the best SEO plugin for WordPress, SEO by Yoast or through Google Webmasters Tool.
Method 1 – SEO by Yoast WordPress Plugin
Go to WordPress Dashboard > SEO > Tools
Locate and click “File Editor” and there you will be able to see the robots.txt file to edit.
After editing, hit “Save Changes To robots.txt.”
Method 2 – Google Webmasters Tool
You may also edit the robots.txt WordPress file through the Google Search Console (Google Webmasters Tool).
Note: You should add your site to Google Webmasters tool and here is a step-by-step guide to add GWT to WordPress
Go to Crawl > robots.txt Tester > edit the file > Submit
When you click the option “See live robots.txt“, you can see your latest file in the new tab.
How To Check robots.txt Is Working Or Not?
In this robots.txt guide, you have learned what is robots.txt file and its uses related to SEO & security.
But have you ever thought as the file you have created is working fine for your website or not? The question should click your mind because you want the surety of your job.
It’s the good news for you! Google Search Console has the robots.txt tester!
By visiting the website you have included in the Google Search console you can test the working of robots.txt WordPress file.
Just go to Crawl > robots.txt Tester and your file will be showing to you.
In this robots.txt checker, you can see the warnings and errors in the file. Google provides everything!
If you want to test this file then you have to fill the box below the file by writing “robots.txt” followed by the URL of your website.
Click on the “Test” option. If the robots.txt file is working fine then in place of “Test”, “Allowed” in green color as shown in the image!
Final Words On Robots.txt WordPress For SEO
Many webmasters are still unaware of the importance of robot.txt optimization.
Not only for SEO, but this simple text file would also help the WP site owners to stay in the safe environment.
“The more search engine bots that crawl my site folders, the higher SERP will I get” – It is a common myth; it is untrue!
Also, you should recognize the robots txt file is to restrict the search engine crawling and not indexing.
You have to create your own optimized robots.txt file to restrict the search engine access to your site. There are many vulnerable files in the root directory of your website which shouldn’t be crawled by the crawlers.
When you see any page of your website which shouldn’t be crawled then you should add it in this file. You may add cgi-bin file, wp-content, and index.php files in this text file.
Now, you have learned why to generate robots.txt WordPress for your site! But, you might still look for the ways to improvise WordPress robot.txt for SEO benefits.
For that, you should understand the Syntax and the case sensitivity. You may check my detailed post “how to optimize robot.txt for WordPress sites” in a perfect manner!
Now, you may discuss with me about this post. Did you get the answer to your questions like what is the use of robots.txt file? How to edit and check the robots.txt for WordPress?
Share your viewpoints/suggestions in the comment section!
6 thoughts on “Important Things About robots.txt File In WordPress”
Thank you for showing the robots.txt usage. It will definitely help beginners.
Indeed an amazing post. I am totally agreed that leveraging Robots.txt file could break or made your SEO campaign. I’ve just started my new blog on WordPress, would like to being proceeded.
Some bloggers neglect to have this important file until they get in troubles!
Thanks for sharing the detailed post!
Very useful post indeed. Generating robots.txt and placing it to Google Webmaster is the first thing to do after creating a blog or website. The robots.txt is the only way to remind about your blog to search engines.
Thanks for share Nirmala. Expecting more post like this.
Thanks for this reminder. I have successfully tested my default robots.txt in accordance to your second method. But I couldn’t dare change. I kept in default format only. Can you help me how to proceed with its customization?
it’s true Nirmala, and virtual robots good option to avoid loss your robots file
I’m talking to free plugin like in wordpress.org
can you feedback please??