How To Exclude Tags, Categories From Google Index

One of the most serious SEO problem is duplicate content. That is having the same content on different URLs. Google doesn’t like this for one obvious reason: no one like reading the same content over and over again.

What is a tag/category page?

In case you don’t know tag and category pages are, they are the pages that list all posts in the same category or share the same tag.

Here is one example of tag page:

If you format your URL based on name, you should see /tag/ in the URL. The same thing can be seen with category.

Letting Google index your category and tag pages is way more serious than duplicate content. In my own observation on my site, category and tag pages usually rank higher than the posts. That means you spend hours optimize your posts to meet all SEO requirements and they will end up no where (because your tag/category pages rank higher).

That’s why you need to mark tag and category pages as noindex to avoid this problem.

How to mark tag and category pages as noindex?

To stop Google from indexing your tag/category pages, you need to let it know by adding a noindex meta tag to such pages. If you don’t know much about coding, no worries. There is no coding required.

To accomplish this, I assume that you have Yoast SEO plugin installed. Let’s begin.

First, go to SEO->Search Appearance

Let’s click on Taxonomies:

Now, under that tab, you’ll see these sections:

If you don’t see the content of such sections, click on the title to show.

Let’s look at the settings that I underlined with red. If you select Yes, the tag/category pages are indexed by Google. If you select No, a noindex meta tag is added to all tag/category pages. As a result, Google will not index those pages.

If your tag/category pages are already in Google’s index, don’t worry. Google bot will remove them the next time it crawls your site.

If you take a look at the page source now, there is a noindex meta tag there:


This subtle change can have a huge impact on your goals (sales, ads click…) since your reader will see the more targeted pages instead of category/tag pages. Also, it may also help you improve your search result click through rate because the title of a single post is always more optimized than that of category/tag pages.

How To Exclude Custom Post Types, Posts, Pages From Yoast SEO Sitemap

If you want to exclude certain custom post types to the sitemap that generated by Yoast SEO plugin, you are at the right place. In this short post, I’m going to show you exactly how to do that.


The only requirement is you need to install my plugin. This is the one I made to solve my own problem. As you can see, I created a plugin called WP Lead Plus X that generates landing pages. It created two custom post types to handle the template files.

I don’t want include those files in the sitemap since they have short content and usually don’t reflect the topic of my main website.

Download the plugin to exclude custom post types from Yoast SEO sitemap below

How to configure what post types to exclude from Yoast SEO site map

Now I assume that you have installed and activated the plugin. In your dashboard, you’ll see it appears under Binary Carpenter:

Click on that, you’ll find a very simple interface:

As you can see, the plugin lists the custom post types available on your site as an unordered list. In my example, I have three custom post types:

  • product
  • core37_lp
  • core37_lp_template

Now, for example, I want to exclude core37_lp and core37_lp_template post types from the sitemap. I’ll enter them into the textarea box below, comma delimited:

Before clicking on the save settings button, let me show you my current sitemap:

As you can see, my custom post types are showing in the sitemap. Let me save changes and reload the sitemap again:

As you can see, the new sitemap doesn’t have the custom post types that I excluded.

Bonus feature

As you can also see in the plugin, you have the ability to exclude certain pages/posts from the sitemap. Simply enter their IDs as comma separated list and they’ll be exclude from your Yoast SEO sitemap.


I hope this plugin is useful to you. Note that it works with Yoast SEO sitemap only.