CSACyber Security AuditWebbandflow
HTTP security headers

X-Frame-Options

A header that controls whether your pages may be embedded in frames on other sites.

What it is

X-Frame-Options tells the browser whether a page may be displayed inside a frame on another site. By denying or restricting framing, it prevents attackers from overlaying your page invisibly to trick users. Modern sites increasingly use the Content Security Policy frame-ancestors directive for the same purpose.

Why it matters

It is the primary defense against clickjacking, where a hidden copy of your page is used to hijack user clicks.

How to fix it

Set X-Frame-Options to DENY or SAMEORIGIN, or use the Content Security Policy frame-ancestors directive, according to your framing needs.

Related terms

References

← Back to the glossary