rel


relstring

Gets or sets the relationship between the link's source page and the target page.

The rel property provides additional context to search engines and browsers about how they should treat the link, influencing SEO, security, and other link behavior.

Supported values:

  • 'noopener': Prevents the target page from accessing the source page with the window.opener property, reducing the risk of malicious code.
  • 'noreferrer': Prevents the browser from sending referrer information, such as the URL of the source page, to the target page. This enhances user privacy by ensuring the target page can't track the origin of the visit.
  • 'nofollow': Tells search engines not to pass SEO link equity to the target page. This helps prevent the manipulation of search rankings and maintains the integrity of your site's SEO.
  • 'sponsored': Indicates that the link is part of a paid or promotional arrangement, ensuring transparency and compliance with search engine guidelines.

An element can have multiple rel values as a single string with each value separated by a space. For example, 'nofollow sponsored'.

The default value for external web links (starting with http:// and https://) is 'noopener'.

Did this help?