Picto thématique

Rule n° 206 - The server sends information that indicates which domains are allowed to embed its pages in frames

Frames are used to display pieces of web pages within a web page. For example, a frame displaying an advertisement on another web page. Your site can also be embedded from another page, for example to test it with certain services. This can also be done with bad intentions, in particular to make an unsafe user believe that he is on your site: this risk must therefore be prevented.

#Development #Security

Goal

  • Reduce the risk of your content being used in misleading ways.

Implementation

Configure the server to send the X-Frame-Options HTTP header with the value deny (to prohibit any inclusion of the page in a frame, regardless of the site) or sameorigin (to limit inclusions to frames with the same domain name as the page). The allow-from value (to limit inclusions to specific URLs), however, does not have sufficient support at the time of writing.

Control

Check using an HTTP header inspection tool that the X-Frame-Options is present with the value deny or sameorigin.

By Opquast - Read the license


Discover Opquast training and certification

The objective of these rules and the Opquast community mission is ‘making the web better’ for your customers and for everyone! Opquast rules cover the key major areas of risk that can negatively affect website users such as privacy, ecodesign, accessibility and security.

Opquast training has already allowed over 19,000 web professionals to have their skills certified. Train your teams, contact us

We offer a 1 hour free discovery module.