How to Add Nofollow Links in WordPress (and When Not To)
To add a nofollow link in the WordPress block editor, select the link, open its Advanced settings in the link popup and turn on Mark as nofollow. In the Classic Editor, switch to the Text tab and add rel="nofollow" to the link’s HTML.
Before you do, it helps to know which links actually need it. Most links you add to your own content are normal editorial links and should stay as they are. This guide explains when to use nofollow, sponsored and ugc, and how to add and check them.
What the rel Attributes Mean
The rel attribute tells search engines about your relationship to the page you link to. Google supports three values for outbound links, documented in its guide to qualifying outbound links:
| Attribute | Use it for |
|---|---|
rel="sponsored" | Links you were paid for or earn from: affiliate links, ads and sponsored posts. |
rel="ugc" | Links added by users, such as in comments or forum posts. |
rel="nofollow" | Other links you do not want to vouch for, when neither of the above fits. |
A normal link without any of these is fine for sources you cite, tools you recommend unpaid and pages you think readers should see. Linking out to useful pages does not harm your site, and you do not need to nofollow links to sites you consider competitors.
Google treats all three values as hints rather than strict rules. You can also combine them, for example rel="sponsored nofollow".

Links WordPress Already Handles
- Comments: WordPress automatically adds
rel="nofollow ugc"to links in comments and to commenters’ website links. - Affiliate link plugins: link managers such as Pretty Links and ThirstyAffiliates can add
sponsoredandnofollowto every link they manage, so you do not have to do it link by link.
Method 1: Mark a Link as Nofollow in the Block Editor
- Select the text and click the link button, or press Ctrl+K (Cmd+K on a Mac), then enter the URL.
- Click the link, choose the edit option in the popup and expand Advanced.
- Turn on Mark as nofollow, and Open in new tab if you want that too.
- Save or update the post.

Button blocks and Navigation links work differently: select the block and fill in the Link relation or Link rel field in its settings, for example sponsored nofollow.
The toggle only adds nofollow. For an affiliate or sponsored link, add sponsored as well: select the paragraph, open the block’s Options menu (three dots), choose Edit as HTML and change the attribute to rel="sponsored nofollow".
Method 2: Add the Attribute in HTML
In the Classic Editor, or a Custom HTML block, write the link with the attribute directly:
<a href="https://example.com/" rel="sponsored nofollow">Example product</a>
In the Classic Editor, switch from the Visual tab to the Text tab to see the HTML.

Add the rel attribute inside the opening <a> tag, then update the post.

Method 3: Use an SEO Plugin
Many SEO plugins add a nofollow or sponsored option to the link popup, or let you set rules for all external links. If you use one, check its link settings first so you do not set the same rules in two places. Avoid blanket rules that nofollow every external link, because that also removes the signal from the sources you genuinely recommend.
Check That the Attribute Was Added
Open the published post, right-click the link and choose Inspect. The highlighted HTML should show the rel value you set. Some themes and plugins rewrite links, so always check the live page rather than the editor.
What Nofollow Does Not Do
- It does not stop Google from crawling or indexing the linked page. To keep your own pages out of search results, use a
noindextag instead. - It does not hide the link from readers. The link works normally for visitors.
- It does not replace an affiliate disclosure. Readers still need a visible note that you may earn a commission.
Wrapping Up
Leave normal editorial links alone, mark paid and affiliate links as sponsored, and let WordPress handle comment links. For the rest of your on-page setup, see my on-page SEO guide.


