Site logo

Archived topic

Will removing 'noreferrer' HTML tag have any impact?

6 replies · Started by crosby87 on April 27, 2022

Viewing posts 1–7 of 7

Hi there,

I would like to remove the noreferrer tag in my HTML links as apparently it disrupts affiliate link tracking.

1. Do you know if there is any truth to that, does it indeed disrupt affiliate tracking?

2. I know for sure that it is against Amazon policy, other affiliate program seems to be fine. I use the GenerateBlocks button, and when I mark the link as Open in new tab it automatically adds the 'noreferrer' tag. When I try to edit it manually and remove the tag, it always adds it back.

I found that on this page https://wordpress.org/support/topic/is-it-possible-to-disable-remove-noreferrer-tag/? Tom provided the following php code to fix this issue:

add_filter( 'render_block', function( $block_content, $block ) {
    if ( 'generateblocks/button' === $block['blockName'] ) {
        $block_content = str_replace( 'noreferrer', '', $block_content );
    }

    return $block_content;
}, 10, 2 );

Will removing the 'noreferrer' tag disrupt my website in any way, or have any impact on SEO?

Thanks in advance!

Hi there,

1. Do you know if there is any truth to that, does it indeed disrupt affiliate tracking?

most affiliate links container some kind of referral ID, generally in the form of a query string at the end of the URL eg. ?ref=123456790 - so noreferrer won't make any difference here. You may want to double check with any one you're affiliated too.

2. target=”_blank” presents a known security issue ( tabnabbing and other phishing attempts ) so WP adds noreferrer to those links to protect the user. Its also an issue that is addressed by Google here:

https://web.dev/external-anchors-use-rel-noopener/

that hopefully explains a little as to why noreferrer always gets added back to the link.

So if you check with your affiliates on #1 there should be no real reason to remove that noreferrer or if you're thinking of doing so - it may better to swap it out for noopener

Hi David,

Thanks!

On Q1:

A) I use multiple affiliate links with partners. In some cases a form of query string e.g. /?mssys_cookie=163657850471693420&aflid=253451 or ?p_id=8323 gets added to the end of the URL. I assume these are fine, right?

B) In some cases, however, I get a totally different URL. Imagine the partner is a bookstore: https://boostore.com/book1. Normally I would get something like https://boostore.com/book1/?p_id=123456, however, with this specific partner I get a totally new link e.g. https://totallynewlink.com/id_x35646135

Would noreferrer cause any issue here?

On Q2: do I understand it correctly that in case affiliate link causes issue you'd reccomend swapping noreferrer to noopener? Problem is that with Generateblock both of them get added automatically. I tried to only keep noopener, but it adds back noreferrer.

1. They look like affiliate links to me that won't care if noreferrer is added. But you may want double check with the provider.

2. You can use the PHP Snippet you shared above to remove the noreferrer and just leave the noopener

Hi David,

Thanks. Does using the PHP snippet and removing noreferrer have any potential negative implications, for example on SEO?

Kind follow-up. Seems this one was missed.

Hi there,

According to Ahrefs, having or not having noreferrer should have no impact on SEO. Having it has an impact on tracking and analytics.

Moreover to give you an idea if you need or don’t need noreferrer, “The noreferrer is used to protect referral information from being passed to the target website and this also hides referral traffic in Google analytics.”

With these said, other than the need to protect referral information (which is preferential), there should be no other impact if you remove this.

References:

https://help.ahrefs.com/en/articles/4684931-noreferrer-noopener-nofollow-attributes#:~:text=is%20used%20for.-,Noreferrer,-Noreferrer%20is%20related

https://www.reliablesoft.net/noreferrer-noopener/#:~:text=The%20noreferrer%20is%20used%20to,links%20in%20a%20new%20tab.

Hope this clarifies. Feel free to reach out if you’ll have any further questions. :)

This archived topic is closed to new replies.