External link rules (nofollow, sponsored, new tab)

Add nofollow, sponsored or ugc to external links and open them in a new tab across your site with RankKit SEO, with domain allow and deny lists.

Updated 3 min read
On this page

External link rules change how links to other websites behave across your whole site, without editing a single post. You can mark them nofollow, sponsored or ugc, open them in a new tab, and keep a list of domains that are always left alone or always nofollowed.

The rules are applied when a page is shown. "Applied when pages render. Your stored content is never rewritten, so switching this off undoes it."

Turn on the rules

  1. Go to RankKit SEO → Settings → Links.
  2. Turn on Apply rules to external links in post content ("Links to this site are never changed."). This is the External link rules module, off by default. You can also switch it on from the Modules card on the Dashboard.
  3. Choose the rules you want (below).
  4. Click Save changes.

Settings

Setting Default What it does
Apply rules to external links in post content Off Turns the rules on or off.
Add nofollow On "Do not pass ranking credit to other sites."
Add sponsored Off "For sites whose external links are mostly paid or affiliate links."
Add ugc Off "For content written by users, such as forum or community posts."
Open external links in a new tab On "Adds target="_blank" with rel="noopener" so the new page cannot control yours."
Never change these domains Empty "One per line. Subdomains are included. Links stay followed and open in the same tab."
Always nofollow these domains Empty "One per line. Gets nofollow even when the nofollow rule above is off."

With both Add nofollow and Add sponsored on, a note warns: "Every external link will get both nofollow and sponsored. Use the domain lists to keep editorial links followed."

How the rules are applied

  • Only external links. A link counts as external when it points to another host name. Relative links and links to your site's own domain (with or without www.) are never changed. A subdomain of your site, such as shop.example.com, counts as external, so add it to Never change these domains if you want it left alone.
  • Only post content. The rules apply to the content of posts, pages and other content types, after blocks, shortcodes and page builders have produced their HTML. Menus, widgets and comments are not changed.
  • Existing attributes are kept. RankKit SEO adds to a link's rel value; it never removes what you set by hand. A link that already has a target keeps it.
  • New tabs are safe. Any external link that opens in a new tab gets rel="noopener".
  • Domain lists match subdomains. partner.com also covers shop.partner.com. You can paste full URLs; only the domain is used, and www. is ignored.
  • Not in feeds or the admin. RSS feeds and the editor show your links as written.

Example, with the defaults (Add nofollow and Open external links in a new tab) and partner.com in Never change these domains:

<!-- In your post -->
<a href="https://example.org/guide">guide</a>
<a href="https://partner.com/offer">offer</a>

<!-- What visitors get -->
<a href="https://example.org/guide" target="_blank" rel="nofollow noopener">guide</a>
<a href="https://partner.com/offer">offer</a>

Typical setups

Your site Suggested rules
Blog that links to sources Add nofollow off, Open external links in a new tab on. Put spammy or paid domains in Always nofollow these domains.
Affiliate or review site Add nofollow and Add sponsored on. Put editorial sources you trust in Never change these domains.
Community or forum content Add ugc and Add nofollow on.

FAQ

Not directly, but it is not needed for ordinary editorial links. Google asks for sponsored on paid and affiliate links and ugc on user-generated links. Linking to good sources without nofollow is normal.

I turned the rules off. Do I need to clean up my posts?

No. Nothing was ever written to your posts, so links go back to exactly what you wrote as soon as the module is off.

The "Outbound links to sources" check counts every external link in your content, whatever its rel value. See Content analysis checks.

Was this page helpful?

Still need help?

Email us with your WordPress and RankKit SEO versions and what you tried. Pro customers get priority replies.

Contact support