Security Auditor — checks that the audited page sends
X-Frame-Options: DENY or SAMEORIGIN, or a Content-Security-Policy with frame-ancestors, so other sites cannot embed it in a frame.Protection
Stops attackers from loading your page in a hidden frame and tricking visitors into clicking it.
Standards
Follows the X-Frame-Options section of the WHATWG HTML Living Standard and honors CSP
frame-ancestors.X-Frame-Options or with the frame-ancestors directive of Content-Security-Policy. This auditor reads both headers from the audited URL.
How it works
- Fetch — sends a
HEADrequest (orGETwhenHEADis not supported) to the audited URL as 37AuditsBot. A blocked request ends the audit with590; any other failure (timeout, DNS, TLS, non-2xx answer) ends it with500. - CSP first — when an enforced
Content-Security-Policyheader (notContent-Security-Policy-Report-Only) has aframe-ancestorsdirective, browsers ignoreX-Frame-Options, so the page passes. Aframe-ancestors *alone allows every site and does not count. - Read — like browsers, collects every
X-Frame-Optionsheader line, splits it on commas, trims and lowercases each value and drops duplicates.DENY, DENYis read asdeny. - Rules — a missing header (
400), the obsoleteALLOW-FROM(401) and any other value that is notDENYorSAMEORIGIN, such asALLOWALL(402), fail. Several distinct values that includeDENY,SAMEORIGINorALLOWALLwarn (300): browsers then block every frame. - Aggregate — FAIL wins over WARNING; when every rule passes the audit is
SUCCESS(200). - Specification pin — every run emits
37A-XFrameOptionsAuditor-100(INFORMATION), naming the X-Frame-Options section of the WHATWG HTML Living Standard as of 2026-10-15. It does not change the overall status.
What it audits
Every row maps to onecheckRule* method and one CheckCode, in the order the auditor runs them. CheckCode suffixes use status ranges: 100 information, 200 success, 300–399 warning, 400–499 fail, 500–599 error.
Output documentation
Risks and considerations
Why clickjacking matters
- Any page where a single click does something (buy, delete, transfer, share, change a password or a permission) can be abused while it sits in a hidden frame on another site.
- Login and account pages are the most valuable targets, but the protection is cheap enough to send on every page.
DENY, SAMEORIGIN or CSP
DENYforbids every frame;SAMEORIGINallows only pages of your own origin.ALLOW-FROMwas never supported by Chrome or Safari and Firefox dropped it, so it gives no protection. To allow specific partner sites, useContent-Security-Policy: frame-ancestors 'self' https://partner.example.- When
frame-ancestorsis present, browsers ignoreX-Frame-Options. Many sites send both so older browsers stay protected.
Duplicate headers
- A web server and a CDN or proxy that both add the header produce values such as
SAMEORIGIN, DENY. Browsers treat that as a conflict and refuse every frame, which can break pages you embed yourself.
What this auditor does not check
- Only the audited URL is fetched; other pages of the site may be sent without the header.
Content-Security-Policyset in an HTML<meta>tag is not read: browsers ignoreframe-ancestorsthere.- The sources listed in
frame-ancestorsare not judged, apart from a lone*.