If you want users to find your content organically in search results, you’ll need to ensure it’s optimized. This way, it can be crawled, indexed, and then ranked by search bots. However, there are certain things that you might want to keep out of search results. Therefore, you may be wondering how to no index WordPress pages or posts.
The good news is that it’s fairly straightforward to do, and there are a few different approaches you can take. For example, you can use a plugin or the native WordPress settings.
Why would you no index WordPress pages and posts
If you manage a WordPress site, chances are you’ve learned a bit about search engine optimization (SEO). This is the practice of optimizing your website so that search engines can easily find your pages and posts.
However, there are some circumstances where you might not want your content to appear in search results. Let’s explore a few reasons:
- Duplicate content. Most of the time search engine bots can distinguish which is the most important when it comes to similar pages. However, they can still erroneously flag something as duplicate content. For instance, if you sell lots of similar products, they might be confused by these product pages. This can negatively affect your site’s performance in rankings.
- Keyword cannibalization. If you accidentally target the same keyword on multiple pages, this is called “keyword cannibalization.” This can confuse search engine bots, causing them to prioritize the wrong pages or posts.
- Thin content. This type of content doesn’t provide real value to users who might find the page in their search results. For example, there’s no need for thank you pages and order confirmation pages to make it into the rankings.
- Privacy protection. If you’re running a personal blog or website, you might not want it to be searchable. For example, if you’re using a blog to document a health journey or keeping a travel diary, this might only be for friends and family.
So, you might want to try keeping your pages out of search engine results. One of the best ways to do this is by stopping Google from indexing your content altogether.
How to no index a WordPress page or post
Now that you’re familiar with some of the scenarios in which it might be appropriate to no index WordPress pages or posts, let’s go over three ways you can do it!
1. Using the Yoast SEO plugin
By far the easiest way to no index a WordPress page or post is using an SEO plugin that offers this feature. With over TK downloads, Yoast SEO is one of the most popular (and highly rated) SEO tools that gives you this option.
After you’ve installed and activated the plugin, simply open the page that you’d like to exclude from indexing. You should now see the Yoast SEO panel at the bottom of the screen:
Simply expand the Advanced section, and you’ll see the Allow search engines to show this Page in search results? option:
By default, this will be set to Yes (current default for all Pages). In the dropdown menu, simply select No. This automatically sets the page to no index.
Now, either Publish or Update the page to save your changes. That’s it! The process is the same for WordPress posts.
2. In your WordPress settings
Next, let’s see how you can set a page or post to no index in your WordPress settings. To do this, navigate to your WordPress dashboard.
Go to Settings > Reading:
Scroll down to the bottom of the page, and you’ll find the section labeled Search engine visibility. All you have to do is check the box next to Discourage search engines from indexing this site. Then, hit Save Changes:
However, when using this method, there are two important things to keep in mind.
First of all, as the disclaimer states, it is up to search engines to honor this request. Secondly, when you enable this setting, it will be applied to your entire site.
Therefore, it might only be useful if you want to no index WordPress for privacy reasons. Otherwise, a more targeted approach will likely be better.
3. Using the robots.txt file
The last way to no index WordPress pages and posts is by editing your robots.txt file. However, if you’re a WordPress beginner, this method is not advisable, as it requires you to access and modify site files.
To begin, you’ll want to first make a back up of your site, just in case anything goes wrong during this process. Next, you’ll need to connect your site to a File Transfer Protocol (FTP) client like FileZilla.
Then, locate your root directory folder, which should be labeled public_html:
Within this folder, you’ll find the robots.txt file. If you don’t already have a robots.txt file, you can create one.
After that, you’ll need to add a rule to your robots.txt file that tells search engine bots not to crawl the page or post in question. To do this, open the robots.txt file using your editor and add the following lines to the top:
User-agent: * Disallow: /your-post-or-page-url
Here, the asterisk represents all potential bots. Meanwhile, you’ll need to modify the Disallow line to include the page or post you want to exclude. After you’ve made your changes, make sure to save them and then re-upload the file.
Keep in mind, though, that this method doesn’t guarantee that your page or post won’t be indexed at all, it means it won’t be crawled. So, it can still wind up in search results. For example, this may happen if someone else links to it.
In fact, Google doesn’t recommend this method for no indexing content specifically. Still, you may want to use this approach to prevent your site from getting overloaded with requests.
Search engine optimization can be an excellent way to increase your site’s visibility organically. However, there are certain pages and posts that are best left out of search results. Furthermore, you may run a more personal site or blog that’s not intended for larger audiences.
Fortunately, you can easily no index WordPress pages and posts. The easiest and most efficient way to do this for specific pages or posts is using the Yoast SEO plugin. However, if you want to block indexing for your entire WordPress site, you can do this in your WordPress settings. Lastly, advanced users can try adding a directive to the robots.txt file.
👉 Alternatively, if none of these approaches suit your needs, you might want to create a private post instead.
Do you have any questions about how to no index WordPress pages and posts? Let us know in the comments section below!