What is rel=”noopener” in WordPress? (and should you remove it)

If you’re looked at your WordPress site’s source code you may have noticed rel=”noopener” on specific links. In this article we’ll go over what is rel=”noopener”, why WordPress adds it, and how to remove it (if you chose to).

What is rel=”noopener” in WordPress?

In 2017 WordPress started to add the rel=”noopener” attribute to links with a target=”_blank” tag.

Whether you’re using Gutenberg or the Classic Editor WordPress will automatically add this attribute to links set to “Open in new tab”.

Adding a new link in Gutenberg with the “Open in new tab” option on

This was designed to prevent tabnabbing which is a Phishing attack that replaces your legitimate tab using the window.opener.location javascript function.

Basically a web page you open when clicking a link can replace your previous tab you had open. This is extremely dangerous since you trust tabs you already have open and an attacker can make the page anything they want (for example a copy of your site that asks for a login but it’s sending the data to their server).

When rel=”noopener” is added to external links sites you’re linking to can’t tabnab your site increasing security.

Does rel=”noopener” Affects your WordPress SEO?

Since there are so many rel attribute values SEO beginners may think that rel=”noopener” is affecting their site’s SEO.

Having rel=”noopener” on your site’s links will NOT affect SEO.

It’s a good idea to keep rel=”noopener” on your target=”_blank” links for added security. Best of all it’s easy since WordPress automatically adds the attribute for you.

noopener vs nofollow

Since you’ll be seeing noopener near nofollow links frequently I thought I’d break down the difference between the two.

noopener prevents cross-site hacking which increases your site’s security.

nofollow prevents search engines from following the link on your site, preventing any “SEO Value” from being transferred to the site you’re linking to.

How to Disable rel=”noopener” in WordPress (Plugin)

If you want to disable rel=”noopener” from being added to your links in WordPress (not recommended) keep reading.

The easiest way to disable rel=”noopener” from appearing on your WordPress links is to use the plugin Remove noreferrer.

Using the plugin as simple as installing and activating it.

How to Disable rel=”noopener” in WordPress (Code Snippet)

If you’re familiar with adding code snippets to your WordPress site either using a functions.php file or the Code Snippets plugin you can use the function below.

This function will only work if you’re suing the Classic Editor. It will disable WordPress from adding the rel=”noopener” attribute to your links you create with “Open link in a new tab” checked.

This function won’t retroactively work on older posts so you can use a plugin like Better Search Replace to modify old links.

Andy Feliciotti

Andy Feliciotti

Andy has been a full time WordPress developer for over 10 years. Through his years of experience has built 100s of sites and learned plenty of tricks along the way. Found this article helpful? Buy Me A Coffee

5 Responses

  1. Nicely Explained! Previously I thought that noopener and nofollow are same thing! but your explanation has cleared my wrong thought. Thanks for sharing this helpful content with us.

Leave a Reply

Your email address will not be published. Required fields are marked *

WordPress Tips Monthly
Get the latest from SmartWP to your inbox.