🔌 Plugin

WordPress Nofollow Plugin · Auto Add nofollow, target=_blank, noopener

Free WordPress plugin that automatically adds nofollow, target=_blank, and noopener to every external link. Lightweight, no settings page, GPL-licensed.

Price: FREE
Version: 1.0.0
Featured image for WordPress Nofollow Plugin · Auto Add nofollow, target=_blank, noopener

I built this because every site I audit has the same problem: outbound links that started consistent and slowly drifted. Some posts have a nofollow attribute, some don’t. Some open in new tabs, some don’t. Most are missing the noopener attribute, which means they’re a security liability you didn’t sign up for. This plugin enforces all three sitewide via a single the_content filter — no settings page, nothing to remember.

What you get

  • Automatic rel="nofollow" on every outbound link, sitewide
  • External links open in a new tab via target="_blank"
  • Tabnabbing protection via rel="noopener noreferrer"
  • Internal links left untouched — only http(s):// URLs pointing to other domains are modified
  • Single PHP file under 2 KB — no database tables, no JavaScript, no settings to configure

Who it’s for

WordPress site owners who write a lot of outbound-link-heavy content (resource roundups, news commentary, recommendation posts) and want consistent link attributes applied automatically without remembering to set them in the editor. Especially useful for sites where multiple authors contribute and link discipline varies.

How to install and verify

  1. Download the plugin .zip from the button below.
  2. Upload via WordPress Admin → Plugins → Add New → Upload Plugin → Install Now → Activate.
  3. Activate. The filter runs on the the_content hook — no settings page, nothing to configure.
  4. Verify it’s working. Open any post that contains an external link, choose “View Source” in your browser, and search for the link’s URL. The anchor should now read <a href="..." rel="nofollow noopener noreferrer" target="_blank">. If the attributes aren’t there, your output cache may need a flush.

Note: the plugin filters output, not stored content. Your post_content in the database is unchanged; uninstalling restores original link behaviour immediately. Test on staging first if your site uses long-TTL output caching.

When NOT to use this

If your site runs paid sponsorships, affiliate links, or guest posts, Google now expects rel="sponsored" or rel="ugc" on those specific links — not blanket nofollow. This plugin doesn’t differentiate; it applies nofollow to every external link uniformly. For sites with mixed sponsorship and editorial content, you want a more discriminating link manager (or a workflow where the editor adds the right attribute at write time). Use this plugin when your outbound links are uniformly editorial — recommendations, citations, source links — and you want the same treatment everywhere.

File details

  • Version: 1.0.0
  • Last updated: December 19, 2025
  • Format: .zip (single PHP file)
  • License: GPL-2.0-or-later
  • Tested with: WordPress 6.7 · PHP 8.1+

Work With Christopher Ross

Who delivers this work

Christopher Ross

Built by a developer and trainer with 25+ years of delivery experience

Christopher Ross is a full-stack developer, technical SEO specialist, and instructor-led training expert with projects spanning government, higher education, and commercial teams across Canada.

  • 25+ years across PHP, WordPress, LMS architecture, and enterprise software delivery.
  • Training and Development Specialist at Sherwin-Williams — classroom, lab, virtual, and online program delivery.
  • Built web systems and low-bandwidth learning environments for government, higher education, and distributed teams.
  • MA in Learning and Technology — Royal Roads University.
  • Open-source WordPress implementations and utilities available on GitHub.

Start a Conversation