Add Nofollow and Sponsored Links in WordPress

1/5 - (1 vote)

Adding an affiliate link in WordPress? You may need rel="sponsored", not just nofollow. If you are linking to a source editorially, you generally do not need either attribute. This updated guide separates the three common cases and avoids telling you to install a plugin for an option your editor may already offer.

Verify the saved link, including multiple rel values

A link can contain more than one rel value. For example, an affiliate link may use rel="sponsored nofollow noopener". The values describe different relationships and behaviors; opening a new tab does not itself label a link as paid.

After saving, inspect the public anchor element to confirm the attributes survived editor or plugin filtering. If a global link tool rewrites attributes, check that it is not indiscriminately applying sponsored to ordinary source citations.

Use descriptive anchor text and make the destination clear. Keep the affiliate disclosure visible in the article as well: a machine-readable attribute does not replace an explanation for readers. Reference: Google’s outbound-link guidance.

Which link attribute do you need?

Affiliate or paid placement: rel="sponsored" (you may also include nofollow). Link you do not want to endorse: rel="nofollow". User-added links in comments or forums: rel="ugc". Ordinary editorial citations usually need no special relationship attribute.

Read Google’s link-attribute guide →

Method 1: check the WordPress block editor’s link controls

  1. Open the post or page and highlight the words you want linked.
  2. Click the link button (or use Ctrl+K / Command+K), enter the destination and apply it.
  3. Edit the link and expand Advanced. WordPress’s current link-control documentation describes a Mark as nofollow option where supported.
  4. Save the post and verify the rendered link if the attribute matters for disclosure or compliance.

Link options vary by block and WordPress version. The nofollow toggle does not necessarily offer a separate sponsored or ugc option; don’t assume those values were added simply because you selected nofollow.

Method 2: add the relationship manually

If the block or editor doesn’t provide the value you need, switch the supported block to its HTML editing mode and add the attribute to the link, for example:

<a href="https://example.com/product" rel="sponsored noopener noreferrer">See the product</a>

Replace the example URL with the actual destination. WordPress may sanitize HTML depending on your user permissions, so preview the result. You can add multiple tokens inside one rel attribute separated by spaces; do not create duplicate rel attributes.

Method 3: assess EditorsKit if you need a broader editor toolkit

The original version of this tutorial highlighted EditorsKit for nofollow and sponsored controls. It may still suit teams already using its other block-editor features, but check its current compatibility, exact link-control behavior and latest changelog before installing it solely for nofollow. A plugin adds maintenance and potential compatibility work.

Check EditorsKit’s current features →

Does nofollow stop people from leaving your website?

No. Nofollow describes a relationship to search engines; it does not prevent a visitor clicking. Opening external links in a new tab is a separate usability choice, not a required SEO setting. Let readers decide how to navigate rather than forcing every external link into a new tab.

Affiliate link checklist

  1. Use clear visible affiliate disclosures where appropriate.
  2. Mark compensated links with sponsored; Google’s documentation says nofollow remains acceptable, but sponsored is preferred.
  3. Verify the destination and make link text describe where it goes.
  4. Inspect the published HTML if an editor, link-management plugin or redirect changes attributes.

Managing many affiliate destinations? Our affiliate link-management plugin comparison discusses the separate tracking and organization decision.