Loading...
Loading...
Prevents your website from being embedded in an iframe on another site. This stops "Clickjacking" attacks.
In a Clickjacking attack, a user visits a malicious site which has your website loaded in an invisible iframe on top of a "Play Game" button. When they click "Play", they are actually clicking "Delete Account" on your site (if they are logged in). XFO tells the browser "Do not allow anyone to iframe me."
Modern alternative: `Content-Security-Policy: frame-ancestors 'none'`. However, `X-Frame-Options: DENY` is still recommended for defense-in-depth and support for older tools. Use `SAMEORIGIN` if you need to frame your own pages within the same site.
Two headers can stop clickjacking: `X-Frame-Options: DENY` and `Content-Security-Policy: frame-ancestors 'none'`. Missing both means your page can be iframed anywhere. Check both on every HTML response.
curl -sI https://yourdomain.com | grep -i x-frame-optionscurl -sI https://yourdomain.com | grep -i content-security-policy | grep -o "frame-ancestors[^;]*"echo '<iframe src="https://yourdomain.com"></iframe>' > test.html && open test.htmlUse both. `frame-ancestors` is the modern, spec'd replacement and supports allowlists (`frame-ancestors self https://partner.com`). `X-Frame-Options` remains as defense in depth for older tooling that does not parse CSP. They do not conflict.
DENY if no page on your site ever needs to be iframed. SAMEORIGIN if you iframe your own pages (dashboards inside an admin shell, help articles inside a product). Never set `ALLOW-FROM` - it is deprecated everywhere.
Drop X-Frame-Options for that route and use `Content-Security-Policy: frame-ancestors https://partner.com` instead. XFO does not support per-origin allowlists; frame-ancestors does.
Applied the configuration change? Run a live scan to confirm the vulnerability is patched.