SecurityResponse Header

X-Frame-Options

Indicates whether a browser should be allowed to render a page inside an <iframe>, <frame>, or <object>, protecting users against clickjacking attacks.

Recommended Production Value
Essential (A+)
DENY

Production Server Implementation

NGINX Configuration Snippet
add_header X-Frame-Options "DENY" always;

Directives & Syntax Breakdown

DENY

Completely blocks the page from being displayed in an iframe on any site, including same origin.

SAMEORIGIN

Permits iframe rendering only if the parent frame belongs to the exact same origin (scheme, host, port).

Common Security Hazards & Pitfalls

  • β€’The legacy "ALLOW-FROM uri" directive is obsolete and not supported in modern browsers. Use CSP "frame-ancestors" instead.
Frequently Asked Questions

X-Frame-Options - Questions & Answers

Common implementation questions, browser enforcement rules, and debugging.

Clickjacking is an attack where a malicious site embeds your page in a transparent iframe and tricks authenticated users into clicking invisible buttons (like "Transfer Funds" or "Delete Account").