How to create robots.txt file in WordPress (2 methods)

No votes yet.
Please wait...

Alright, have you been working to make your WordPress blog’s SEO better?

If so, then start from using the best WordPress SEO plugin i.e., Yoast SEO and its recommended settings import file. After setting up your WordPress SEO with Yoast plugin, you must check on your blog’s robots.txt file which stands for blocking the search engine robots to access the specific parts of your website.

If you want to know why you actually need to create a robots.txt file for your WordPress blog and why is it important? then read on…

robots.txt file plays a vital role in overall SEO performance of any website. As I said earlier, it actually allows you to communicate between search engines and your website. It tells the search engines what to crawl and what not to, so that the only specific parts your site should get indexed.

2 Methods to create robots.txt file in WordPress

Following are the methods to create robots.txt file in WordPress:

  • Robots.txt File WordPress plugin
  • Using Yoast SEO plugin’s Tools

1. Robots.txt File WordPress plugin

First of all, install and activate the robots.txt file WordPress plugin.

Go to Dashboard → Settings → Reading

How create Robots.txt file in WordPress

2. Creating robots.txt file using Yoast SEO plugin

If you are already using Yoast SEO plugin then you don’t have to following the method #1 because you can create robots.txt file using Yoast SEO plugin. All you need to follow the steps below:

Go to Yoast → Tools → File editor

Where you will find a button says: Create robots.txt file

create robots.txt button

So, that’s how we create robots.txt file in WordPress and if you want to know how to place codes inside of robots.txt file then follow this article.

Similar Posts


  1. No need to an additional plugin, Yoast is the requirement of all wordpress users so I recommend to use yoast method instead an addtional plugin, BTW Haroon, thanks for easy tutorial for newbie.

    No votes yet.
    Please wait...
    1. Always. Thanks for stopping by USMAN 🙂

      No votes yet.
      Please wait...

Leave a Reply

Your email address will not be published. Required fields are marked *