Security
Clickjacking protection (X-Frame-Options)
Protection against another site embedding yours in a hidden frame to trick visitors into clicking. It is set with the X-Frame-Options header or, more flexibly, the frame-ancestors directive of a Content-Security-Policy.
Why it matters
Without it, another site could load yours inside a frame and try to trick visitors into clicking hidden buttons. The newer frame-ancestors directive in CSP does the same job.
Example
X-Frame-Options: DENYWhere you will see it
The free Security headers checker looks at this on a live page and explains what it finds in plain English: grade HSTS, CSP and the other protective headers, with copy-paste fixes for Nginx, Apache, Cloudflare and Netlify.
Related terms
- Content-Security-Policy: An HTTP response header that lists which sources a page may load scripts, styles, images and other resources from.
- HTTP header: A name and value pair sent along with a request or a response.
- Referrer-Policy: An HTTP response header that controls how much of the current page's address is sent to another site when a visitor follows a link or loads a resource from it.
Go deeper
- Security headers explained: What HSTS, Content-Security-Policy, X-Content-Type-Options, frame-ancestors, Referrer-Policy and Permissions-Policy do, with safe example values.