How to Add the Nofollow Tag to a Link

Updated July 4, 2020

The easiest way to add the nofollow tag to a link in WordPress is via the Yoast SEO plugin. If you don’t have a WordPress site (you should get one!), you’ll have to manually add the HTML to your link. Let me show you how.

Disclosure: This post contains affiliate links. If you click through and make a purchase, I’ll earn a commission, at no additional cost to you. Read my full disclosure here.

Here’s how to add the nofollow tag to a link in WordPress:

Can’t see the video? Watch it here.

Why nofollow tags are important

When a search engine robot (“bot”) lands on a page on your site, it crawls through, and reads the text on that page. This is the way it figures out what your page is about, a vital step in SEO.

Once it knows what your page is about, it can index your page and show it in search results when people are looking for that type of content.

What about links?

When a bot crawls through your page and comes to a link, it follows that link. The link is like a tiny door to that other page. The search bot goes through the door (link) and reads the next site too.

Whenever you link to another page on the internet, you are basically telling the search engine, “Hey search engine, here’s a page I like and you should go read that one too.”

When you link to a page, it’s like you’re giving that page a thumbs up.

Some refer to it as “passing PageRank.”  In other words, you’re spreading Google love and “voting” for that linked page.

And the search engine says, “Hey, thanks for the suggestion! I’m always looking for more site suggestions, so I’ll be sure to check it out.”

Then off it goes through the door. It crawls that webpage and adds it to its arsenal of good sites to put in search results.

In that way, links are what makes the internet go round. (Or at least search.)

But not all links should get a thumbs up from you

There are times when you don’t want to — or shouldn’t — give a thumb’s up to another page when linking to them.

This is where the nofollow tag comes in.

As the name suggests, the nofollow tag on a link tells a search engine not to follow that link. Essentially, you are closing the door to that link so the bots don’t go there.

The nofollow tag allows you to link to a page (so your readers can check it out) but not give a “thumb’s up” to the search engines.

When to use the nofollow tag

Google explains when you should use the nofollow tag, but I’ll give you the gist. Always use the nofollow tag when:

  1. You link to a site you don’t want to “vote” for, or can’t vouch for.
  2. You link to a site that requires a login or registration. Because bots can’t register or log in, it’s not really helpful for them to visit that site. In that case, it’d be better for that bot to stay on your site and explore your site a little more.
  3. You use an affiliate link or are linking to a site with whom you have a some sort of paid or compensated relationship. If you get free product, are provided giveaways, get paid to post, earn affiliate commission, are awarded credit or are otherwise compensated in any way, you must make the link nofollow. Google wants their search results clean and not influenced by paid relationships. Passing PageRank too sites with whom you have this sort of relationship goes against their terms of service. Also, do not forget to disclose your relationship in those posts as well. I wrote more about that here.

How to add the nofollow tag to a link manually

Write your basic link HTML:

<a href="http://LandingPageURL.com">Text to the link</a>

Now add the nofollow tag before the first > like so:

<a href="http://LandingPageURL.com" rel="nofollow">Text to the link</a>

If you have some sort of paid relationship with that link, add “sponsored” like this:

<a href="http://LandingPageURL.com" rel="sponsored nofollow">Text to the link</a>

If it’s an affiliate link, it might look more confusing because it’s longer, but the concept is the same.

Find the spot where HTML is accepted on your site and paste this snippet where you want your link to appear.

That’s it! That link is now a nofollow link.

21 thoughts on “How to Add the Nofollow Tag to a Link”

  1. This is really detailed explanation with screenshots. Do you recommend keeping some “good” links in order to improve page rank? Or multiple links impact negatively on page rank?

    Thanks for the great information!

  2. We made the mistake of starting out on a wordpress.com site, so there aren’t any plug-in options. We also can’t actually add in no-follow links using this method. These are all such great tips, but I thought it would be worth it to mention just in case anyone else here has this problem!

  3. Awesome, important, and easy to understand advice on a topic that isn’t glamorized and beat to death already on the web but that deserves attention.

    I love how clean the 1-3 steps are and then the illustration of how to do it. Very cool. Very helpful.

    Thank you Amy for making it easy to understand this topic and to address it properly. 🙂

  4. This is a wonderful post, and I’m definitely going to examine my posts and add the nofollow tag throughout.

    Thank you for such a useful ‘blogging tip!

    1. I would definitely start from this point forward. Going back, I might tackle it a bit at a time, starting with your most popular archived posts. I don’t think I’d kill myself trying to catch everything (and there might be even a quicker solution if you googled it).

  5. There is a great plugin for that called NoFollow Link. Just highlight your link and click the NoFollow button that the plugin installs. It doesn’t look like it does anything, but when you click from Visual to Text you can see that the link has the nofollow code in it.

  6. Do you know how many times I have said to my computer, “You’re the best, Amy.” I have been trying to find a good answer to the nofollow question for a while. Thanks for helping me to understand. 🙂

  7. Hey Amy,

    Thanks for the tutorial, very helpful. Is there any way to do this when using a 3rd party that runs my ads in my sidebar. I use passionfruit to run some ads in my sidebar so wondered if this could be added to that shomehow too.

    Cheers
    Mel

    1. Hi Mel,

      Great question. I believe some ad networks already back the nofollow tag into their code. You might check with Passionfruit to see if they do so.

Comments are closed.