Sitewalk / Guides / Issue guides / Clickjacking protection

Clickjacking protection: how to check your headers and fix them

Clickjacking means another site loads your page in an invisible frame and tricks visitors into clicking buttons they cannot see. Two headers stop it: Content-Security-Policy: frame-ancestors and the older X-Frame-Options.

Does your site have it?

curl -s -o /dev/null -D - https://yoursite.com/

Look for x-frame-options or a content-security-policy line that contains frame-ancestors. If neither is there, other sites can frame your pages. MDN says the same: without any such mechanism the browser allows embedding.

The 2 problems

What you seeThe problem
No x-frame-options and no frame-ancestorsMissing clickjacking protection.
x-frame-options: ALLOW-FROM ... or another value, and no frame-ancestorsInvalid value. MDN calls ALLOW-FROM obsolete: modern browsers ignore the header completely.

Why it matters

This matters most for login, account and checkout pages. Sitewalk checks the home page response.

How to fix it

Send both headers:

Content-Security-Policy: frame-ancestors 'self'
X-Frame-Options: SAMEORIGIN

Check it worked

Run the curl command again and read both lines. Then run an audit.

What Sitewalk found on real sites

Our own site sends both headers (checked 16 Nov 2026).

Check your whole site in one sentence

Sitewalk checks these headers along with 200+ other technical SEO checks. In ChatGPT, say:

Audit yoursite.com for technical SEO problems

Get started

Checked on 16 Nov 2026. Header behaviour from MDN Web Docs, read 16 Nov 2026. Sitewalk counts are from 87 audited sites, each site's latest audit: a small early-user group, a first look and not a survey.

More guides

All issue guides ยท All guides