Latest Tech and Tips

How to Optimize Your WordPress Robots. txt for SEO


Recently among our viewers asked us for ideas on how to optimize the robots.txt documents to enhance SEO.

Robots txt documents informs internet search engine how to creep your internet site that makes it an extremely effective SEO device.

In this post, we will certainly reveal you how to develop an excellent robots.txt documentsfor SEO

Using WordPress robots.txt file to improve SEO

What is robots.txt documents?

Robots txt is a message documents that internet site proprietors can develop to inform internet search engine crawlers how to crawl and also index web pages on their website.

It is generally saved in the origin directory site, additionally called the primary folder, of your internet site. The fundamental layout for a robots.txt documents resembles this:

User- representative: [user-agent name]
Disallow: [URL string not to be crawled]

User- representative: [user-agent name]
Allow: [URL string to be crawled]

Sitemap: [URL of your XML Sitemap]

You can have several lines of directions to enable or refuse details URLs and also include several sitemaps. If you do not refuse a URL, after that internet search engine crawlers presume that they are enabled to creep it.

Here is what a robots.txt instance documents can appear like:

User-Agent: *
Allow:/ wp-content/uploads/.
Disallow:/ wp-content/plugins/.
Disallow:/ wp-admin/.


In the above robots.txt instance, we have actually enabled internet search engine to crawl and also index data in our WordPress posts folder.

After that, we have actually prohibited search crawlers from creeping and also indexing plugins and also WordPress admin folders.

Lastly, we have actually supplied the URL of our XML sitemap.

Do You Need aRobots txt File for Your WordPress Site?

If you do not have a robots.txt documents, after that internet search engine will certainly still creep and also index your internet site. However, you will certainly not be able to inform internet search engine which web pages or folders they need to not creep.

This will certainly not have much of an influence when you’re very first beginning a blog site and also do not have a great deal of web content.

However as your internet site expands and also you have a great deal of web content, after that you would likely desire to have far better control over how your internet site is crept and also indexed.

Here is why.

Search crawlers have a crawl allocation for each internet site.

This indicates that they creep a particular variety of web pages throughout a crawl session. If they do not end up creeping all web pages on your website, after that they will certainly return and also return to crawl in the following session.

This can reduce your internet site indexing price.

You can repair this by prohibiting search crawlers from trying to creep unneeded web pages like your WordPress admin web pages, plugin data, and also motifs folder.

By prohibiting unneeded web pages, you conserve your crawl allocation. This assists internet search engine creep a lot more web pages on your website and also index them as promptly as feasible.

Another excellent factor to make use of robots.txt documents is when you desire to quit internet search engine from indexing an article or web page on your internet site.

It is not the most safe method to conceal web content from the public, however it will certainly assist you avoid them from showing up in search results page.

What Does anIdeal Robots txt File Look Like?

Many preferred blog sites make use of a really straightforward robots.txt documents. Their web content might differ, depending upon the requirements of the details website:

User- representative: *.


This robots.txt documents enables all crawlers to index all web content and also offers them a web link to the internet site’s XML sitemaps.

For WordPress websites, we advise the complying with regulations in the robots.txt documents:

User-Agent: *.
Allow:/ wp-content/uploads/.
Disallow:/ wp-content/plugins/.
Disallow:/ wp-admin/.
Disallow:/ readme.html.
Disallow:/ refer/.


This inform search crawlers to index all WordPress photos and also data. It forbids search crawlers from indexing WordPress plugin data, WordPress admin location, the WordPress readme documents, and also associate web links.

By including sitemaps to robots.txt documents, you make it very easy for Google crawlers to locate all the web pages on your website.

Now that you understand what a suitable robots.txt documents appear like, allow’s have a look at how you can develop a robots.txt documents in WordPress.

How to Create aRobots txt File in WordPress?

There are 2 methods to develop a robots.txt documents inWordPress You can pick the approach that functions finest for you.

Method 1:Editing Robots txt File Using All in One SEO

All in One SEO additionally called AIOSEO is the very best WordPress SEO plugin out there made use of by over 2 million sites.

It’s very easy to usage and also features a robots.txt documents generator.

If you do not have currently have the AIOSEO plugin mounted, you can see our detailed overview on how to set up a WordPress plugin.

Note: Free version of AIOSEO is additionally offered and also has this attribute.

Once the plugin is mounted and also turned on, you can utilize it to develop and also modify your robots.txt documents straight from your WordPress admin location.

Simply go to All in One SEO” Tools to modify your robots.txt documents.

AIOSEO robots.txt editor

First, you’ll require to turn on the modifying choice, by clicking the ‘Enable Custom Robots.txt’ toggle to blue.

With this toggle on, you can develop a customized robots.txt documents inWordPress

AIOSEO enable custom robots.txt

All in One SEO will certainly reveal your existing robots.txt documents in the ‘Robots.txt Preview’ area at the end of your display.

This variation will certainly reveal the default regulations that were included byWordPress

Robots.txt default rules

These default regulations inform the internet search engine not to creep your core WordPress data, enables the crawlers to index all web content, and also offers them a web link to your website’s XML sitemaps.

Now, you can include your very own customized regulations to enhance your robots.txtfor SEO

To include a policy, get in an individual representative in the ‘User Agent’ area. Using a * will use the regulation to all customer representatives.

Then, choose whether you desire to ‘Allow’ or ‘Disallow’ the internet search engine to crawl.

Next, get in filename or directory site course in the ‘Directory Path’ area.

Add rule in robots.txt

The regulation will immediately be used to your robots.txt. To include an additional regulation clicks the ‘Add Rule’ switch.

We advise including regulations till you develop the perfect robots.txt layout we shared above.

Your customized regulations will certainly appear like this.

Robots.txt custom rules file

Once you’re done, do not fail to remember to click the ‘Save Changes’ switch to shop your modifications.

Method 2.Edit Robots txt documents Manually Using FTP

For this approach, you will certainly require to make use of an FTP customer to modify robots.txt documents.

Simply link to your WordPress holding account utilizing an FTP customer.

Once within, you will certainly be able to see the robots.txt documents in your internet site’s origin folder.

FTP connection robots.txt

If you do not see one, after that you likely do not have a robots.txt documents.

In that situation, you can simply go on and also develop one.

FTP connection create robots.txt

Robots txt is an ordinary message documents, which indicates you can download it to your computer system and also modify it utilizing any kind of ordinary message editor like Notepad or TextEdit

After conserving your modifications, you can publish it back to your internet site’s origin folder.

How to Test Your Robots txt File?

Once you have actually produced your robots.txt documents, it’s constantly an excellent suggestion to examination it utilizing a robots.txt tester device.

There are numerous robots.txt tester devices around, however we advise utilizing the one within Google Search Console.

First, you’ll require to have your internet site related toGoogle Search Console If you have not done this yet, see our overview on how to include your WordPress websiteto Google Search Console

Then, you can make use of the Google Search Console Robots Testing Tool.

Select website property robots.txt tester

Simply choose your building from the dropdown checklist.

The device will immediately bring your internet site’s robots.txt documents and also highlight the mistakes and also cautions if it discovered any kind of.

Robots.txt tester results

Final Thoughts

The objective of maximizing your robots.txt documents is to protect against internet search engine from creeping web pages that are not openly offered. For instance, web pages in your wp-plugins folder or web pages in your WordPress admin folder.

A typical misconception amongst SEO professionals is that obstructing WordPress group, tags, and also archive web pages will certainly enhance crawl price and also cause much faster indexing and also greater positions.

This is not real. It’s additionally versus Google’s web designer standards.

We advise that you adhere to the above robots.txt layout to develop a robots.txt documents for your internet site.

We wish this post aided you find out how to optimize your WordPress robots.txt documentsfor SEO You might additionally desire to see our supreme WordPress SEO overview and also the very best WordPress SEO devices to expand your internet site.

If you liked this post, after that please subscribe to our YouTube Channel for WordPress video clip tutorials. You can additionally locate us on Twitter and also Facebook.