How to Nofollow WordPress Category Navigation

How to Nofollow WordPress Category Navigation

I recently had a major problem recently with one of my WordPress websites: the website’s category archives were outranking its posts for many searches. For example, in some cases I’d search for something like “Troubleshooting Problems With the 1999 Acme Blue Widget” and Google would consider the “Widgets” category archive the most relevant result for the search.

Scroll to the bottom of this page to skip the background information and see the instructions for how to nofollow the category navigation links in your WordPress menu bar.

Archives Outranking Posts

When your category or tag archives outrank your posts on a WordPress website, it can lead to two very serious problems. First, if a user lands on a category archive page when he actually wanted to see a post, it means that he still has more searching to do once he reaches your website before he’ll be able to see the information he wants. In this situation, many users will click “Back” and try another website.

More importantly, consider the situation above from a keyword density standpoint; in this situation, your post about troubleshooting problems with the 1999 acme blue widget is probably the most relevant post on your website for a variety of keywords such as “1999 blue widget” and “blue widget problems.” Keywords such as those probably appear multiple times within the post, while they probably appear just once on the category archive page. If Google selects the archive page as the most relevant one to display, you’ll probably rank poorly against other websites because they appear far more relevant to Google than your category archive.

Should You Noindex Your Category and Tag Archives?

A lot of people use plugins such as WordPress SEO by Yoast to eliminate potential duplicate content issues with WordPress by noindexing items such as category, tag, author and date-based archives. WordPress SEO is a great plugin, but if you’re simply noindexing content as a knee-jerk response when Google displays your category archives instead of your posts, you may not be handling the situation in the best possible way. In my case, I had added lengthy text descriptions to my category archives in an attempt to rank for more general keywords. I didn’t want to noindex my archives, as doing so would make the category descriptions worthless from an SEO standpoint.

Why Category and Tag Archives Can Outrank Posts

Before we move on, one thing I want to mention about WordPress SEO and duplicate content is that you shouldn’t waste your time trying to fix what isn’t broken. In my case, I had a website with a legitimate problem that was causing me to lose search engine rankings, traffic and conversions. None of my other websites had this problem, so there would be no reason for me to add “nofollow” to my category and navigation links.

How can you be certain that your category archives are outranking your posts? Perform several searches on Google with your exact post titles wrapped in quotation marks. If your archive pages appear before your posts, you have a problem. In my case, I believe that the problem had something to do with the fact that the website had a rather extensive category-based navigation system in which some posts appeared under multiple categories. Posts appearing under only one category were ranked properly, while posts appearing under multiple categories were ranked improperly. The fact that every page on my website had do-follow links to every category meant I was sending PageRank to the archives, causing them to appear more relevant to Google than the posts themselves.

Nofollow WordPress Category Navigation

Initially, I looked for a plugin that would add “nofollow” to all of the category links in my website’s navigation bar automatically. It turns out that WordPress already has this ability if you’re using custom menus.

  1. Open the Menus screen under the Appearance heading of the WordPress admin menu.
  2. Click the tab for the menu you want to edit.
  3. Click the Screen Options tab at the top of the page and select the Link Relationship (XFN) check box.
  4. Close the Screen Options tab. Each time you click the arrow on the right side of a menu option, you’ll now see a field titled Link Relationship (XFN).
  5. Type nofollow in the Link Relationship (XFN) field for each link to which you want to add the “nofollow” attribute.
  6. Click the Save Menu button when you are finished.

2 Responses to “How to Nofollow WordPress Category Navigation”

  1. Jon Fergus says:

    Hi Aiden. Wondering if you can help me understand this last section a little better. Warning: I’m a newbie to all this.

    What I want is to hide the navigation menu and category menu text from search results. ATM, if I search for a keyword that happens to be in one of my menu-pulldowns, then every page of the site turns up in the results, since every page of the site has the navigation menu on it.

    When you say: “Type nofollow in the Link Relationship (XFN) field for each link to which you want to add the “nofollow” attribute.”, does this hide just the link or also the page it leads to?

    Hope my question makes sense… I don’t have the lingo down yet 😉

    Any help would be appreciated.

    • Aiden Clinton says:


      Adding the “nofollow” attribute to a link doesn’t hide it from users or from Google; it simply tells Google not to pass PageRank through the link.