Use noindex Meta Tag in WordPress to Prevent Search Engine Indexing Categories, Tags and Archives

WordPress has the content duplication problem which may confuse search engines. Duplicate content won’t hurt you, unless it is spammy or keyword stuffing, as said by Matt Cutts, and Google may just ignore the duplicate content. However, instead of letting the search engines decide which pages of the duplicate ones are important, we may only want the search engine to index the posts and pages instead of categories, tags or archives.

A noindex meta tag will prevent search engine such as google from indexing the page. Google’s rule about noindex tag is like this [1]:

“When we see a noindex meta tag on a page, Google will completely drop the page from our search results, even if other pages link to it. If the content is currently in our index, we will remove it after the next time we crawl it. The meta tag allows you to control access on a page-by-page basis, which is useful if you don’t have root access to your server. (You’ll need to be able to edit the source HTML of your page.)”

We can add noindex tag to the head of archives, categories, tags and search results in WordPress.

The method is simple. First find the header.php file in the theme directory. Then insert these codes into the area between <head> and </head>:

date archive, category, tag and search result
if( is_author() | is_date() | is_search() | is_category() | is_tag() ) {

If you would like search engines to index some pages, such as the categories, you may delete the relevant is_… functions such as is_category().



Eric Ma

Eric is a systems guy. Eric is interested in building high-performance and scalable distributed systems and related technologies. The views or opinions expressed here are solely Eric's own and do not necessarily represent those of any third parties.


  1. That’s really a very simple solution to No index tags and categories. But if you are using Yoast plugin you may configure it to no index the tags and categories.

  2. Pingback: What is a better solution of doing SEO for WordPress than using a dedicated plugin? -
Leave a Reply

Your email address will not be published. Required fields are marked *