I have to link some other external sites.
I know when to use nofollow
. But I am not clear when I should use rel=noreferrer
.
I have to link some other external sites.
I know when to use nofollow
. But I am not clear when I should use rel=noreferrer
.
As @unor said, it hides referrer information when the link is clicked. Basically this is a privacy enhancement, when you want to hide information for owner of the domain of a link where is clicked that the user came from your website.
Example:
User is on your website www.mywebsite.com, there you have a
<a href="https://newsite.com">Link</a>
when someone clicks the "Link" the owner of newsite.com knows it came from www.mywebsite.com. By settingrel=noreferrer
you prevent revealing this information.A good example how it works is starting from 21:28 of this conference talk. This is considered to be a good practice when working with server-side (e.g. Node.js). You can also read about this on the Helmet documentation.
In short, the
noreferrer
link type hides referrer information when the link is clicked. A link with thenoreferrer
link type looks something like this:If someone arrives at your site from a link that uses this link type, your analytics won't show who refered that link. Instead, it will mistakenly show as direct traffic in your acquisition channels report.
If you have an external link to someone else's site you don't trust and you want to hide referrer information then you can combine both and use
I advise you to use
nofollow
links for the following content:nofollow
the outbound linksnoreferrer
doesn't just block the HTTP referrer header, it also prevents a Javascript exploit involving window.openerWith
noreferrer
most browsers will disallow thewindow.opener
exploitYou'll o ly need to use this on private pages or pages you dont want to advertise. E.g. a webmail or private bug tracker would be considered private and you don't want to leak any information to the external linked websites.
Sensitive public pages, like medical information or other sensitive topics may also want to mask the referrer header.