Screpy SEO platform logo New Screpy is coming 🎉

Unsafe links to the cross-origin destinations

If you use the attribute of target = "_ blank", you may cause your site to experience problems in terms of user experience and security.

Reviewed by Screpy Editorial Team

To solve this kind of problem, it is often necessary to add rel="noopener" or rel="noreferrer" to HTML. The addition should be done to the target="_ blank" links. In this way, this problem can be eliminated.

When a problem is discovered in the scanning studies of the Google Lighthouse system, the system gives you a warning about it:

Unsafe links to the cross-origin destinations

To discover that a link can cause unsafe situations, Lighthouse takes the following actions or processes:

  1. First, Lighthouse looks at the <a> tags in the system. Among them, options where the target="_ blank" attribute is located are gathered. Those with the rel="noopener" or rel="noreferrer" attributes are not included in gathering.
  2. All codes with the same-host link are filtered.

If you are working for a large website, you may have a problem filtering same-host links. If a page has a target="_ blank" link that goes to another page, it needs to use rel="noopener". If it does not use that, Lighthouse may not be able to scan it while performing the audit.

How to prevent security vulnerabilities?

You need to add code snippets to all the links that the Lighthouse system offers you as a warning. Adding rel="noopener" or rel="noreferrer" will fix the problem. In general, the place you need to add will be target="_ blank".

Example Pet Store
  1. The main thing the rel="noopener" code snippet does is to prevent the other site from creating a security vulnerability on your site via the malicious URL. For this, access to window.opener is blocked.
  2. rel="noreferrer" does a similar action. Also, it prevents the system from sending the ‘’Referrer’’ header to a new page.

Related tasks

Solve the errors logged to the console

If there are error warnings about your website within the console offered by the browser, you need to follow a few basic steps to resolve them.

Tuesday, December 22, 2020

Title Tags Not Found

Are you encountering the title meta tag not found the issue? You can solve it right away! Here are the causes and importance of the problem in detail.

Sunday, December 20, 2020

Robots.txt Not Found

If you are encountering the Robots.txt not found error, you can create your file immediately by paying attention to the steps below. Discover the details now!

Sunday, December 20, 2020

Not Crawlable Pages

Have the same problem with crawlability issues? Let’s see what you can do for your website to be indexed. Here are the ways and solutions!

Sunday, December 20, 2020

Meta Description Not Found

Are you getting a meta description not found a warning about your web page? Let's figure it out! Why is meta description important, how to pass the audit? Examine!

Sunday, December 20, 2020