This post may contain affiliate links, including Amazon links. As an Amazon Associate, I earn from qualifying purchases. When you make a purchase through these links, I may earn a small commission, at no extra cost to you. Your support is greatly appreciated. Please see my Disclosure Policy for further information.
Spread the love

There are plugins that add the nofollow tag for you, I’ve used one myself, but there may come a time when you need to add the nofollow tag manually.

I noticed my plugin wasn’t working with the new Gutenberg update, so I thought I’d write a post on how to add a nofollow tag manually.

How To Add The Nofollow Tag Manually

What Is Nofollow?

A nofollow tag tells search engines not to follow that link. You can read all about nofollow and dofollow links in a post I have written here.

How To Add The Nofollow Tag To A Link

Switch to the HTML/Text editor and find your link. A regular follow link will look like this:

<a href=”URL HERE”>Anchor Text</a>

To change it to nofollow, add the rel=”nofollow” tag as below:

<a href=” URL HERE ” rel=”nofollow”>Anchor Text</a>

When Your Link Is Set To Open In A New Window

When you set links to open in a new window, the link is bit different and you will see it already has rel=”noopener“:

<a href=” URL HERE ” target=”_blank” rel=”noopener”> Anchor Text </a>

Because it already has rel inserted, you don’t need to add another or delete this one, you can simply add nofollow straight into the rel tag like below:

<a href=” URL HERE ” target=”_blank” rel=”nofollow noopener”> Anchor Text </a>

You will find when looking at links that open in a new window using the Gutenberg editor,  it inserts a noreferrer tag automatically as well as noopener and your link will look something like this before you insert your nofollow tag:

<a href=” URL HERE ” target=”_blank” rel=” noreferrer  noopener”> Anchor Text </a>

Noreferrer and noopener are inserted for the security of your site so it’s best to leave them in.

Some people confuse noopener with nofollow, but they are completely separate.

When adding nofollow and or sponsored tags especially for affiliate links you link will look like this:

<a href=” URL HERE ” target=”_blank” rel=” noreferrer noopener nofollow sponsored”> Anchor Text </a>

Suggested reading:

*WordPress for Beginners 2019. Master WordPress using our step-by-step visual approach (over 330 screenshots). This book is a major new release for 2019, covering the latest version of WordPress.

*HTML and CSS: Design and Build Websites. A full-colour introduction to the basics of HTML and CSS .

How To Add The Nofollow Tag Manually

Spread the love