Skip to main content
Meowdit

X-Frame-Options and Clickjacking Protection Explained

X-Frame-Options is a response header that tells the browser whether other websites may show your page inside an iframe. Without it, and without a CSP frame-ancestors rule, another site can load your page invisibly on top of its own and trick visitors into clicking your buttons without realising it. That attack is called clickjacking.

What it is

Other websites are allowed to display your pages inside a hidden frame.

Why it matters

Attackers can overlay your page with something deceptive so visitors click buttons (like 'delete' or 'pay') without realising.

Meowdit rates this high risk.

How to tell if your site has it

  • Open your browser's developer tools, go to the Network tab, select the request for the page itself and read the response headers. Look for X-Frame-Options, or for a Content-Security-Policy that contains frame-ancestors. If neither is there, the page has no clickjacking protection.
  • Checking the home page is not enough. Login, account settings and payment confirmation pages carry the buttons an attacker wants, so check those pages one by one.
  • If the site sits behind a CDN or a hosting platform, the platform may add or strip headers. Trust what the live response shows, not what a config file says.
  • Other scanners may word it as a missing X-Frame-Options header or missing clickjacking protection; both point to the same issue.

Fix direction

Add an anti-framing rule to your server responses: for a modern site, prefer the frame-ancestors directive of your Content-Security-Policy, and keep X-Frame-Options alongside it for older browsers. By default allow framing only by your own site; if a partner genuinely needs to embed your pages, allow just those domains rather than everyone.

A scan gives you the steps specific to your site, plus a fix prompt you can paste into an AI tool. See what a report looks like: View the public example report

FAQ

What is the difference between X-Frame-Options DENY and SAMEORIGIN?
DENY means no website may frame the page, including your own. SAMEORIGIN means only pages from the same origin (same domain, scheme and port) may frame it. The two differ only in who is allowed to frame the page; which one fits depends on how your own site uses iframes, and your scan report gives the recommendation for your site.
I already have a Content-Security-Policy. Do I still need X-Frame-Options?
When both are present, modern browsers follow the CSP frame-ancestors directive, so a CSP that includes frame-ancestors already covers this. Many policies only restrict scripts and never mention frame-ancestors, and in that case the page is still unprotected.
My site has no login. Does clickjacking still matter?
The risk is lower, but any button with a consequence, such as submitting a form, starting a download or following a payment link, can be the target. The protection does not affect normal visitors, so it is cheap to add.

References

Related checks

Related guides

All checks · View the public example report

This page was written and checked by AI and has not been reviewed by a person, so please verify before applying; see About Meowdit. Last updated: 2026-11-22