The rel=”noopener” attribute is a security feature that is added to links in WordPress that open in a new tab. It prevents the new tab from being able to access the parent window, which helps to protect your website from malicious attacks.
The rel=”noopener” attribute is added automatically by WordPress when you create a link and select to open it in a new tab. You can also add it manually by editing the link’s HTML code.
Here is an example of how the rel=”noopener” attribute looks in HTML:
Code snippet
<a href="https://example.com" rel="noopener">This link will open in a new tab</a>
Use code with caution. Learn morecontent_copy
The rel=”noopener” attribute is a valuable security feature that can help to protect your website from malicious attacks. If you are using WordPress, be sure to enable it for all links that open in new tabs.
Here are some additional details about the rel=”noopener” attribute:
- It was introduced in 2015 by Google as a security measure to prevent cross-site request forgery (CSRF) attacks.
- It is supported by all major web browsers.
- It does not affect SEO.
- It can be added to links manually or automatically by WordPress.
If you are concerned about the security of your website, I recommend enabling the rel=”noopener” attribute for all links that open in new tabs.
How to add rel=”noopener” in WordPress? (Explained)
There are two ways to add the rel=”noopener” attribute to links in WordPress:
1. Using the TinyMCE editor
- Go to the post or page you want to edit.
- Click on the “Text” tab in the editor.
- Highlight the text you want to make into a link.
- Click on the “Link” button in the toolbar.
- In the “Link” dialog box, enter the URL of the link in the “URL” field.
- Click on the “Open in new tab” checkbox.
- In the “Rel” field, type “noopener”.
- Click on the “OK” button.
The link will now open in a new tab, and the rel=”noopener” attribute will be added to the link’s HTML code.
2. Using the code editor
- Go to the post or page you want to edit.
- Click on the “Code” tab in the editor.
- Find the link you want to add the rel=”noopener” attribute to.
- In the link’s HTML code, add the rel=”noopener” attribute to the href attribute.
- Save the post or page.
The link will now open in a new tab, and the rel=”noopener” attribute will be added to the link’s HTML code.
What is rel=”noopener” and why should I use it?
The rel=”noopener” attribute is a security measure that helps to protect your website from malicious attacks. When you add the rel=”noopener” attribute to a link, it tells the browser to open the link in a new tab and prevent the new tab from accessing the parent window. This helps to prevent malicious websites from stealing information from your website or injecting malicious code into your website.
How does rel=”noopener” affect my SEO?
The rel=”noopener” attribute does not affect your website’s SEO. In fact, it can actually improve your website’s security and make it more resistant to malicious attacks.