How to Access and Edit a Robots.txt File in WordPress

 • 4 min read

Share on facebook
Share on twitter
Share on linkedin
how to edit robots.txt
#1 SEO Company for Small Businesses.
Table of Contents

Ever wonder how Google knows what information to index from your website? They actually follow the instructions that you give right on your website. That’s right — using a robots.txt file, you can guide Googlebots seamlessly through your WordPress site. Keep reading to learn more about robot.txt files and how to edit your robots.txt file in WordPress.

What is a Robots.txt File?

Googlebots are responsible for finding and crawling your web pages and files. The goal of these bots is to collect information about your content and send it back to Google’s servers to be indexed. However, these bots often need directions to know what exactly to crawl. That’s where robot.txt files come in.

In the simplest sense, a robots.txt file is the instructions your website gives to Googlebots. These files are primarily used to ensure your website is not overrun with crawler requests. If too many of these requests come in, your website may start to slow down in order to process all the Googlebots, leading to a decreased user experience.

To maintain the balance, you can create a robots.txt file that will direct Googlebots to crawl, or not crawl, certain information. Though you cannot use this file to hide an entire page from Google, this also allows you to hide specific content, such as audio files, that you do not want to appear on your page. It will also speed up the time it takes for a Googlebot to crawl your website if it knows just what it’s looking for.

Without further ado, let’s get into where your robots.txt file is in WordPress and how to edit that file.

Where is the Robots.txt File in WordPress

So, where is the robots.txt file located? WordPress will automatically create a robots.txt file for your website. Your defaultrobots.txt file is then stored in one location on your WordPress — the root directory. You can find this file right through your URL. Simply type in your website (ex. Markitors.com), add /robots.txt at the end, and hit ‘Enter’. We’ve included an example below so you can see what our robots.txt file looks like.

how to edit robots.txt

From this location, however, you may notice that there’s no ‘Edit’ option. You’ll need to log onto your WordPress in order to edit your robots.txt file and set the necessary instructions. Learn how to edit your robots.txt file below.

How to Edit a Robots.txt File in WordPress

Though a default robots.txt file can be a great feature if you don’t have any specific preferences, it may not work for every website. We’ll break down a couple of ways you can edit a robots.txt file in WordPress so you can set the best instructions for Googlebots.

Rank Math SEO

One such way to edit your robots.txt file in WordPress is through an SEO plugin. Rank Math SEO is a beneficial plugin that allows you to optimize website content based on best practices. This plugin makes it incredibly easy to edit and change your robots.txt file. We’ve broken down the three primary steps below.

To start, you’ll need to download the plugin. Once you’ve added Rank Math to your WordPress, the plugin will appear at the top of your dashboard.

how to edit robots.txt

When you’re ready to edit your robots.txt file in WordPress, click on the Rank Math SEO plugin and make your way to the dashboard. Select ‘General Settings’ from the left sidebar. Once you’ve opened the general settings, you’ll see an option titled ‘Edit robots.txt’. This is where you’ll set any instructions regarding page elements that should not be crawled.

how to edit robots.txt

After you’ve entered the right information, you can click ‘Save Changes’. If you want to view your changed robots.txt file, you’ll simply type in your URL and /robots.txt, such as with markitors.com/robots.txt.

Easy enough, right? Rank Math SEO and other similar SEO plugins make it simple to edit your robots.txt and let Googlebots know just what they’re looking for.

Robots.txt Editor

Rank Math SEO isn’t the only option you have to edit your robots.txt file. There are additional plugins that you can use to ensure that Googlebots are crawling your website correctly. We’ll cover how to use Robots.txt Editor today.

Much like Rank Math SEO, you’ll need to install the Robots.txt Editor plugin. Once it’s been installed, select ‘Plugins’ on the left sidebar and find this new plugin. You’ll simply need to select ‘Settings’ underneath the name. This plugin will then allow you to make any changes to your robots.txt file right there. Once you’re done, you’ll have the option to preview your file to ensure everything is correct before hitting save.

And viola — two easy ways to edit your robots.txt file right in WordPress! There are plenty of other ways that you can make changes to your files, such as other SEO or editor plugins, but these are a great starting point for keeping your website from being overrun by Googlebots.

We understand that maintaining the best technical SEO practices for your website can be challenging. There are many different elements you need to keep in mind as you build and change your website. Luckily, there are skilled technical SEO teams, like the one here at Markitors, that can help you through this process. Contact our team today to learn more about the technical SEO services we offer and how we can assist you with leading Googlebots to the right information!

Subscribe to our Blog

Stay up to date with the latest marketing, sales, and SEO tips and news.

We're committed to your privacy. Markitors uses the information you provide to us to contact you about our relevant content, products, and services. You may unsubscribe from these communications at any time. For more information, check out our privacy policy.

More from Markitors

Subscribe to our Blog

Stay up to date with the latest marketing, sales, and SEO tips and news.

We're committed to your privacy. Markitors uses the information you provide to us to contact you about our relevant content, products, and services. You may unsubscribe from these communications at any time. For more information, check out our privacy policy.

We’re committed to your privacy. Markitors uses the information you provide to us to contact you about our relevant content, products, and services. You may unsubscribe from these communications at any time. For more information, check out our privacy policy.