Since the last versions of WordPress, we have been able to see a new attribute when adding a link, the parameter is “noopener”, but, what is nopenner in WordPress? Let’s see how it affects your website.
What Is The Rel=”Noopener” Attribute?
The rel=”noopener” attribute, in a nutshell, is an attribute that is added when a link is opened in a new window or tab.
Every time we create a new link we have two options, the first is that the link opens in a new tab or window, or that the link opens in the same window.
When we select the option to open the link in a new window, the attribute target=”_ blank” is automatically added to us. Now also, the attribute rel=”noopener” will be added.
It may seem intrusive to us, but in reality it is a security measure to prevent malicious links from taking control of an open tab.
There is a so-called window.opener object in JavaScript that can be used to control the parent window (the one we are currently in) through a secondary window (the open window). In this casl, hackers can grab the tab currently open by the user and steal information, such as the access data to your website.
The rel=»noopener» attribute blocks the use of the Javascript window.opener object. In other words, if window.opener does not work, one tab cannot control another tab.
Also, the rel=”noreferrer” attribute avoids passing the reference information to the new tab.
What About SEO?
There are people who think that the rel=”noopener” attribute can affect WordPress SEO, but this is not true. It does not affect the performance of WordPress, nor its SEO ranking.
I have rel=”noreferrer noopener”?
We open the WordPress editor and create a new link, selecting the option “Open in a new tab”.
Next we select the three dots menu the option Edit as HTML.
Now we just have to look for the HTML link and we will see how the attribute rel=”noopener” has been added.
It is possible that in a link you can have both attributes, noopener and noreferrer. The two work together, do not worry, it does not affect the protection of the link.
You may also think that the noreferrer attribute, by not passing personal information, can harm your affiliate links, but it is not true, affiliate programs with a unique URL that also includes your affiliate ID.
If you have not started in the WordPress world yet, we have a post that can help you, Create Your Website With WordPress.
References:
wordpress.org
Leave a Reply