What is X-Frame-Options?
Also called: Clickjacking protection, frame-ancestors
Some sites can embed your page in a frame and place invisible buttons over it to trick visitors. The X-Frame-Options header tells browsers whether any site may frame your page. Its modern replacement is the frame-ancestors rule in a content policy.
Why it matters
It protects visitors from clickjacking, where they are tricked into clicking something on your page. It builds trust, and we make no claim that it changes search or AI answers.
How Onbiom checks it
Onbiom's rule: inside the combined browser protection check, the homepage needs framing protection. It passes with an X-Frame-Options header with any value, or with a frame-ancestors rule inside the Content-Security-Policy header. If neither is found the check fails.
We do not judge the value, for example DENY or SAMEORIGIN. X-Frame-Options has no row of its own. This is a safety advisory about your visitors, reported apart from search visibility.
In your report this appears as: Other sites cannot frame your pages.
How to check it yourself
- Run the command below against your own address.
- Look for an x-frame-options line, or frame-ancestors in the content policy.
curl -sI https://example.com | grep -i x-frame-optionsNot sure about your own site? Paste your address and see in a minute which of these checks your site passes. Free, no account needed.
How to fix it
- Any website
- Ask your host or CDN to send X-Frame-Options: SAMEORIGIN. If a partner embeds your pages on purpose, tell your web person first.
- Cloudflare
- Cloudflare: open Rules, then Overview, create a Response Header Transform Rule and add the header as a static header.
- nginx
- nginx: add the line to your server block with add_header, then reload nginx.
- Apache
- Apache: add the line with the Header directive in your site configuration or .htaccess file (needs mod_headers), then reload.
Related terms
Sources and further reading
Last reviewed: