This post contains affiliate links. Which means I will make a commission at no extra cost to you should you click through and make a purchase. Read the full disclosure here.

Ever looked at the code for your WordPress links and wondered what noreferrer means?
Well, if affiliate marketing or being able to accurately track your blog traffic using Google analytics is important to you.
Then you’ll want to keep reading to find out exactly what this code snippet does. Why you’ll likely want to remove it. And how to stop WordPress from adding noreferrer to your WordPress links automatically.
- What You Need To Know About rel=noreferrer & Other Tags Added To WordPress Links
- What Is Noopener?
- What Is Noreferrer?
- What Is Nofollow? Is It The Same As Noreferrer?
- What’s The Point Of Noreferrer vs Noopener Then?
- Solutions To Stop WordPress From Adding rel=noreferrer In WordPress
- Why Can’t I Just Delete Noreferrer From My WordPress Links By Editing The HTML?
- What About Setting Links To No Longer Open In A New Tab?
- 1. How To Edit Your WordPress Theme’s Function File To Disable Noreferrer
- Removing Noreferrer From Your Recently Created Or Updated Blog Posts
- 2. Recommended: How To Use The Code Snippet Plugin To Disable & Remove Noreferrer From WordPress Links Code
- Final Checks To Remove Noreferrer From Your WordPress Links
- Why You Should Disable Noreferrer For Your Affiliate Links
- Recap On Disabling Noreferrer For Your Links In WordPress
What You Need To Know About rel=noreferrer & Other Tags Added To WordPress Links
Overall, issues related to rel=noreferrer. Have been coming and going through different WordPress versions. This issue was first seen in version 4.7.4 and then disappeared in 4.9 for a while. Until it seems to have recently reappeared in WordPress 5.0 and beyond.
So, where does noreferrer and other tags like it come from?
Well, when you add links to your WordPress posts and pages. The visual editor will often add HTML code to your links in the background for you automatically. Regardless of whether you use the Classic or Gutenberg block editor.
This is usually all well and good. After all, you are probably using the visual editor to save time and not have to worry about HTML code, right?
If you’ve never switched to the HTML code view of your blog post. Then you probably won’t have noticed WordPress adding tags. Like noreferrer or noopener to your WordPress links.
At the very least every blogger needs to know about nofollow links. As they are required for things like affiliate links. And are something you should consider for SEO purposes.
So, to help you understand the problems that noreferrer might cause for bloggers. Let’s cover what the different tags mean for your links in WordPress.
Keep in mind: That the nofollow code is the only one that will impact your SEO. Both noreferrer and noopener have no direct impact on your SEO. As they are only used by your browser and Google Analytics.
📌 In a rush? Pin this post to your Blogging or WordPress board to read it later! 📌

What Is Noopener?
Noopener is a tag that protects against a security flaw in browsers. That can happen when website links open in a new tab automatically. This is something you as a blogger will set when creating your WordPress links.
The security flaw, called Tabnabbing. Can result in phishing attacks for users browsing from a safe website to one infected with phishing code. By adding rel=noopener to your WordPress links. You are effectively protecting your users against this.
There are no known disadvantages to using this tag. Only the benefits of improved security.
So you should always use this tag whenever you tell your blog post links to open in a new tab. In fact, WordPress will add these for you automatically, so you don’t have to worry about editing code.
What Is Noreferrer?

Noreferrer works similar to noopener. As it protects users against the same security issue.
However, this tag also prevents information about the source page being passed to the newly opened tab.
This extra feature is what can cause your blog issues. As it can prevent necessary information from being collected by Google Analytics.
Because when noreferrer is used for your links. Google Analytics won’t know the source of your blog traffic. Meaning it will group it under direct traffic.
Rather than telling you it was referral traffic from Pinterest for example.
Also, the second major issue of noreferrer relates to your affiliate links. As it hides information from your affiliate program too.
Your affiliate links should still track and give you proper credit. As most affiliate programs pass your affiliate ID through the URL and cookies.
But hiding this information can get you into trouble with affiliate programs. Such as Amazon Associates. Resulting in your account being suspended. And any potential sales being lost while you try to appeal the decision.
I cover this in detail as to why it happens later on.
What Is Nofollow? Is It The Same As Noreferrer?
Many people refer to nofollow as the tag to use to prevent losing SEO link juice to external websites. However, this is inaccurate and I consider it to be an extremely common myth.
There’s a reason why SEO plugins now recommend having at least 1 external dofollow link per page and consider nofollowing everything to be bad practice.
You see, using what is considered a dofollow link won’t reduce your link juice. Unless you are linking to a spammy low-quality site. Which you should never do anyway. As you always want to provide value to your readers!
Instead, you should consider any dofollow links as saying to google that you are vouching for the website’s value and information.
Nofollow is the only tag that affects your SEO. And it has completely different uses compared to noreferrer and noopener. So ensure you don’t confuse these!
What’s The Point Of Noreferrer vs Noopener Then?

At this point, you might be wondering. Why should you use noreferrer when it can cause so many problems. When the perfect solution is to just use noopener instead?
Well, the main reason why WordPress is suddenly using both of these tags. Whenever you add links that open in a new tab is because the noopener tag doesn’t cover some of the super old browsers like Internet Explorer.
It is worth noting that these browsers that don’t support the fix provided by noopener. Only involve a tiny percentage of users across the entire internet.
For example, Internet Explorer is only used by around 2% of total users in reports as recent as October 2019. This number should only get smaller over time.
Internet Explorer is an old browser. And has been replaced with Microsoft Edge since its release back in 2015. Internet Explorer is increasingly unsupported. Especially considering that Microsoft will soon no longer be supporting Windows 7.
If you use or know someone who is still using Internet Explorer. Then I urge you to make the switch to another browser. As there are many limitations to using such an old browser. Especially if security is important to you.
Though what I likely think is the case. Is that this 2% might just be users resetting their pc back to default. And being stuck with Internet Explorer. Until they download another browser after that first restart.
Solutions To Stop WordPress From Adding rel=noreferrer In WordPress

So, now that we’ve covered the important information about noreferrer. And why it can cause a lot of trouble for you as a blogger.
Let’s talk about how to remove noreferrer from your WordPress links. So you can avoid such problems.
For the record, official channels on WordPress may state that removing noreferrer is not recommended. But considering the amount of trouble noreferrer causes. And a tiny 2% amount of cases noreferrer might impact. Which to me seems like an overestimate anyway.
I recommend removing noreferrer using one of the below methods. But I want you to understand that this is just my opinion. And that you should make your own decision based on the facts above.
With that out of the way. I want to talk about the different solutions you can use. That will allow you to disable or remove noreferrer on your WordPress blog.
Now would be a good time to backup your blog. Since there will be some code you need to paste into your blog.
And consider using a staging site like I have been. Since you’ll be able to test any changes first before you make them live on your blog.
Why Can’t I Just Delete Noreferrer From My WordPress Links By Editing The HTML?
Okay, so you might be wondering. Why can’t you just delete noreferrer from the code in your blog posts?
Whilst this sounds like it would be a simple answer to the problem. The way that noreferrer is being added to your links will prevent this solution from working on its own.
Because if you delete it from your HTML and then save or update your blog post. WordPress will automatically add it back to all your links.
Yep, sometimes WordPress can be a sneaky little troublemaker like this.
So, deleting noreferrer in an attempt to disable it, will just end up with you wasting a ton of time.
Let’s look at what solutions can work instead.
What About Setting Links To No Longer Open In A New Tab?

Both the noreferrer and noopener tags are only ever added when you open links in a new tab. So you could avoid the issues with noreferrer by not setting your links to open in a new tab.
But here’s the thing. Having your links open into a new tab is extremely beneficial. Especially for your audience’s reading experience.
Think about it from your own perspective. If you are reading a blog post and click on a link that provides extra context. Do you really want to lose your place where you’ve read up to?
Or would you rather the link opened into a new tab. So you can switch to it, read it and then head back to the exact place you left off in the original blog post?
I know I prefer having links open in a new tab. And I bet your audience feels the same.
So much so, that all my links here on this blog should automatically open in a new tab for you. No extra clicks required.
1. How To Edit Your WordPress Theme’s Function File To Disable Noreferrer
One method you can use to remove noreferrer from your WordPress blog. Would be by adding some code to your functions.php file that is part of your theme.
Go to Dashboard > Appearance > Theme Editor and find the functions.php file.

Open your functions.php file for your child theme.
If you are not familiar with WordPress child themes then check out this information here.
Paste the below code at the bottom of your functions.php file:
//This code removes noreferrer from your new or updated posts
function my_targeted_link_rel($rel_values) {
return 'noopener';
}
add_filter('wp_targeted_link_rel', 'my_targeted_link_rel',999);
(Original code source came from here)
Now, this code only removes and disables noreferrer for new blog posts. Or any that you go back and edit to going forward.
This leaves you with the problem of updating all your other posts that still include the noreferrer tag.
Besides this, these changes might be lost. If you have to update your theme and don’t have a child theme setup with the changes. Or if your child theme is from a custom developer and they update the theme.
Removing Noreferrer From Your Recently Created Or Updated Blog Posts
If you need to go back through older blog posts to remove noreferrer. Then the easiest way to do this is to switch the Text tab in the Classic editor.
Or in the Gutenberg editor, you can switch by going to the Options button (3 vertical dots in the corner). And then clicking on Code Editor. You can also use the keyboard shortcut Ctrl+Shift+Alt+M.

From here you can press Ctrl+F on your keyboard to bring up the search menu. Type in noreferrer and search your blog post’s code for it.
This will let you highlight all the noreferrer tags showing in your blog post. You can double click on these and then click delete to handle them quickly.
Overall, this process can be time-consuming if you have a lot of blog posts though. You might not even know which blog posts you need to change. If WordPress has been adding noreferrer to your links for a while before you noticed.
If you want to avoid having to do this, then this next method can potentially save you a ton of time.
2. Recommended: How To Use The Code Snippet Plugin To Disable & Remove Noreferrer From WordPress Links Code
From your WordPress dashboard go to Plugins > Add new.
Then search for and install the plugin Code Snippets
Once installed and activated, you’ll need to go to Snippets > Add new using the left side menu.
Give your code snippet a name and set it to Only run on site front end.
Next, we’ll copy and paste in some code. This code is the same as the one mentioned in the previous method.
So you can skip it if you’ve done it already. Or use it as an alternative to avoid problems with updating your theme later.
Copy and paste the following code into the code box:
//This code removes noreferrer from your new or updated posts
function my_targeted_link_rel($rel_values) {
return 'noopener';
}
add_filter('wp_targeted_link_rel', 'my_targeted_link_rel',999);
(Original source code came from here)
At the bottom of the screen click Save Changes and Activate.

Next, we want to repeat the process for a 2nd Code Snippet.
So, go back and click on Snippets > Add new again.
Give the snippet a name and this time paste this code into the box instead:
// Removes noreferrer on the frontend only, you will likely still see noreferrer in the code view of the editor
function noref_formatter($content) {
$replace = array("noreferrer " => "" ," noreferrer" => "");
$new_content = strtr($content, $replace);
return $new_content;
}
add_filter('the_content', 'noref_formatter', 999);
Go to the bottom to click Save Changes and Activate.
This code will remove noreferrer from any existing blog posts that are still using it. The noreferrer will still display in your WordPress editor when viewing the code. But these are stripped out of the final code shown on the live version of your blog.
You should use this code exactly as it is. The additional spaces around noreferrer are deliberate.
Final Checks To Remove Noreferrer From Your WordPress Links
Regardless of the method, you used above. You’ll want to confirm that your changes have worked.
To do this clear any cache you have set up for your blog. And then open the live version of your blog in New private window in Firefox. Or an Incognito tab using Chrome.
You can open this special type of tab. Usually, by clicking on the Options button found in the top right corner of your browser.
Next, find a link in one of your blog posts that should have been updated and right-click on it. From there you’ll want to click on Inspect or Inspect Element depending on your browser.

A window will appear with your blog’s HTML and a few lines for the URL you right-clicked on will be highlighted.
As you can see in this example, the rel=”nofollow noopener” for this link. There is no longer any set rel=noreferrer tag.

If you still see noreferrer showing. Then you need to go back and double-check the steps above.
Why You Should Disable Noreferrer For Your Affiliate Links
Noreferrer is debated on whether it can affect your blog’s affiliate links. Many argue that noreferrer should have no impact on your affiliate links. As they should still track through your ID included in the URL. Plus whatever cookies are added by the browser.
Why the conflicting answers?
Well, even with the sudden change back in WordPress 4.7. Resulted in some Amazon Associate accounts being suspended. That seemed to be related to using noreferrer to hide the origin of link clicks.
Because Amazon likes to keep strict control over their affiliate program to ensure there are no cheaters. They often review accounts and look for information from the source URL.
Hiding the source URL, which is what noreferrer does was a violation of their terms back in 2017.
Those that did get their accounts suspended. Were restored once the issue was explained. Since it was a change enforced by WordPress rather than the bloggers themselves.
But I’d wager that being suspended from Amazon Associates. Probably had an impact on those bloggers’ incomes.
Using Noreferrer For Your WordPress Links Is Against Amazon’s Affiliate Terms
But that was back with 2017, what about now?
In particular, Amazon Associates Terms in 2022 state:
(v) You will not cloak, hide, spoof, or otherwise obscure the URL of your Site containing Special Links (including by use of Redirecting Links) or the user agent of the application in which Program Content is displayed or used such that we cannot reasonably determine the site or application from which a customer clicks through such Special Link to an Amazon Site.
(Source, Amazon.com)
Using noreferrer on your affiliate links is still against Amazon’s terms in 2022.
This means that if Amazon reviews your account. And find your source URL information is being hidden. Then you risk them suspending your account. Which you’ll have to appeal. Meanwhile, you could be missing out on commissions.
Many other websites say that the majority of affiliate links won’t be affected by noreferrer. But I think this is a pretty bold statement considering how big and popular amazon is.
It’s not clear if noreferrer only affects Amazon’s affiliate links. Some people have suggested that Shareasale has similar terms. But I haven’t been able to find it within their terms of use.
Oh and one more thing. Even if your affiliate links track correctly with noreferrer. And it is not against your affiliate program terms.
You likely won’t be able to track where your affiliate sales are coming from. As the page URL will have been removed from the information used to generate reports.
Knowing exactly which pages on your blog are resulting in sales rather than just clicks is super important information. So if you’re leaving noreferrer on your links you’re missing out.
Recap On Disabling Noreferrer For Your Links In WordPress

So, there you have it. Hopefully, by now you’ll understand that noreferrer is a security fix. That also hides certain information about your links.
This hidden information is what can cause issues with your affiliate links. Specifically, because it is against Amazon’s terms. Your links should still track fine and you should still get commissions.
You’ll likely not know where these commissions have come from though.
This hidden information can also cause problems with Google Analytics. Since it can no longer tell where these clicks come from.
Meaning it will be more difficult to analyze your traffic. As well as other websites won’t be able to tell if you are sending them any traffic.
Noreferrer can be avoided if you use noopener instead. As this fixes the security issues for all modern browsers. Without any of the drawbacks that noreferrer has.
Noreferrer along with noopener are just tags. That your browser and Google Analytics pay attention to. So they have no direct impact on your SEO optimization. They may sound similar to nofollow. But they are completely different.
Will you be disabling or removing noreferrer from your WordPress links? Have you experienced or know of anyone who’s been impacted by this? Tell me your thoughts in the comments below.
📌 Enjoyed this post? Then pin this post to your best Blogging or WordPress tips board! 📌


Hi, thanks for the article. I only added the second snippet to remove the existing noreferrer entries and it works on posts, but doesn’t work on menu items. How do I make it work in the menu?
Hey Alex,
If you want to prevent WordPress adding noreferrer to your menu items and links when opening in a new tab. You can add the below line of code to the second snippet you have installed from this post. Like this:
add_filter(‘wp_nav_menu’, ‘noref_formatter’, 998);
I don’t really use it myself, since I usually just have menus open directly without a new tab since that’s what most people expect. Rather than opening links within a blog post as a side thought to check later.
I hope this helps!
What are some reasons this wouldn’t be working on mine? I’m going crazy trying to fix this and no matter what codes i paste from anywhere, none of them seem to work. Any advice?
Jordan
Hey Jordan,
Have you tried removing the noreferrer manually from the HTML code of a blog post using the Code Editor and seeing if that works?
If you’ve tried clearing your cache plugin, have you also made sure to clear any CloudFlare cache as well?
Finally, when checking if the noreferrer is gone, have you tried checking your post using a Private tab in Firefox? Sometimes I find Google Chrome is slow to clear any local cache on my computer with the new files from the servers.
A lot of amazon affiliate accounts suspend for rel=”noreferrer” in 2022
Thanks for your article.
I’ve definitely heard of people getting suspended because of this, luckily they usually reactivate the account once you explain the issue to Amazon. It’s still a major inconvenience though.