Noindex a post or page in WordPress, the easy way!

Some posts and pages should not show up in search results. To make sure they don’t show up, you should tell search engines to exclude them. You do this with a meta robots noindex tag. Setting a page to noindex makes sure search engines never show it in their results. Here, we’ll explain how easy it is to noindex a post in WordPress if you use Yoast SEO.

Why keep a post out of the search results?

Why would you NOT want a page to show up in the search results? Well, most sites have pages that shouldn’t show up in the search results. For example, you might not want people to land on the ‘thank you’ page you redirect people to when they’ve contacted you. Or your ‘checkout success’ page. Finding those pages in Google is of no use to anyone.

For those kinds of pages, you’re going to want to ‘noindex’ them.

What kinds of pages might I want to set to noindex?

Author archives on a one-author blog

If you are the only person writing for your blog, your author pages are probably 90% the same as your blog homepage. That’s not a valuable page, and might be considered to be duplicate content. To prevent this you can disable the author archive entirely – here’s how to enable or disable it easily with Yoast SEO. If, for some reason, you’d like to keep it on your site, but out of the search results, you can noindex it. Fortunately, with Yoast SEO, this is not very difficult either; just check how to noindex an author archive.

Certain (custom) post types

Sometimes a plugin or a web developer adds a custom post type that you don’t want to be indexed. For example, a music blog might want to have artist and album posts indexed, but not individual songs.

Thank you pages

These pages are typically thin on content and don’t provide a good experience as an entry into the site. If you’re using analytics on your site or running ads, entrances to these pages might also trigger conversions and skew your data!

Admin and login pages

Most login pages shouldn’t be in Google. Luckily, if you are running WordPress, you’re safe as your site’s login page is automatically noindex’d.

Internal search results

Internal search results are pretty much the last pages Google would want to send its visitors to. If you want to ruin a search experience, you link to other search pages, instead of an actual result. But the links on a search result page are still very valuable, you definitely want Google to follow them. So, all links should be followed, and the robots meta setting should be:
<meta name="robots" content="noindex, follow">

Yoast SEO makes sure your internal search pages are set to noindex by default. It’s one of Yoast SEO’s hidden features. This is not an editable setting, because it’s simply how it should be done according to the Google Guidelines, and we fully agree with them on this.

For developers only: If you do want to change this, this can be done by using one of our filters. An example can be found here.

How to set a post to noindex with Yoast SEO

Setting a post or page to noindex is simple when you’re running Yoast SEO. Below your post, in the Yoast SEO meta box, just click on the Advanced tab:

The Advanced tab in the Yoast SEO meta box harbours the indexing options

On the Advanced tab, you’ll see some questions. The first is: “Allow search engines to show this post in search results?” If you select ‘Yes’, your post can show up in Google. If you select ‘No’, you’ll set the post to noindex . This means it won’t show up in the search results.

Select No from the dropdown menu to noindex this post

The default setting of the post – in this case, Yes – is the setting you’ve selected for this post type in the Search Appearance tab of Yoast SEO. If you want to prevent complete sections of your site from showing up in Google, you can set that there. This is further explained in Edwin’s post: Show x in search results?.

Please note that if the post you’re setting to noindex is already in the search results, it might take some time for the page to disappear. The search engines will first have to re-crawl the page to find the noindex tag. And do not noindex posts frivolously: if they were getting traffic before, you’re losing that traffic.

Were you considering to use the robots.txt file to keep something out of the search results? Read why you shouldn’t use the robots.txt file for that.

When you set a post to noindex, Yoast SEO automatically assumes you want to set it to noindex, follow. This means that search engines will still follow the links on those pages. If you do not want the search engines to follow the links, your answer to the following question should be ‘No’:

Simply answer No if you don’t want Google to follow links on this page

This will set the meta robots to nofollow, which will change the search engines’ behavior. In theory, this means that they’ll ignore all the links on the page, although Google may still crawl them in order to discovery new URLs.

Since Yoast SEO 14.4, you can also set individual links to nofollow in the block editor. You can even mark a commercial link as sponsored, which automatically adds a nofollow attribute as well. Simply click on the link and adjust the settings for that particular link.

You can set individual links as nofollow in the WordPress block editor

PS. Did you noindex a post or page in WordPress while you didn’t mean to? No worries, as you can fix an accidental noindex easily!

Read more: The ultimate guide to the meta robots tag »

Coming up next!


18 Responses to Noindex a post or page in WordPress, the easy way!