PatchPingsAI-Powered
HomeFeaturesMonitoringPricingHow it worksFAQ
Download free
PatchPings

Secure. Monitor. Fix.

AI-powered website monitoring & audits

Product

  • Features
  • Monitoring
  • Scans
  • DMARC checker
  • SSL checker
  • Pricing
  • FAQ

Company

  • About
  • Knowledge Base
  • Contact

Install

  • Lens
  • WordPress
GET IT ONGoogle Play
PrivacyExtension privacyCookiesTermsAcceptable useDelete account

© 2026 PatchPings by CodenVibe IT LLC. All rights reserved.

PatchPings

Secure. Monitor. Fix.

AI-powered website monitoring & audits

Install

  • Lens
  • WordPress
GET IT ONGoogle Play

Product

  • Features
  • Monitoring
  • Scans
  • DMARC checker
  • SSL checker
  • Pricing
  • FAQ

Company

  • About
  • Knowledge Base
  • Contact

© 2026 PatchPings by CodenVibe IT LLC. All rights reserved.

PrivacyExtension privacyCookiesTermsAcceptable useDelete account
PatchPings

Secure. Monitor. Fix.

AI-powered website monitoring & audits

Product

  • Features
  • Monitoring
  • Scans
  • DMARC checker
  • SSL checker
  • Pricing
  • FAQ

Company

  • About
  • Knowledge Base
  • Contact

Install

  • Lens
  • WordPress
  • GET IT ONGoogle Play

© 2026 PatchPings by CodenVibe IT LLC. All rights reserved.

PrivacyExtension privacyCookiesTermsAcceptable useDelete account
  1. Home
  2. /
  3. Knowledge Base
  4. /
  5. X-Frame-Options Header Guide
Security 3 min readOct 19, 2026

X-Frame-Options Header Guide: Stop Clickjacking

X-Frame-Options tells browsers whether your pages may be embedded in frames. Learn DENY vs SAMEORIGIN, how it relates to CSP frame-ancestors, and how to verify the header.

The PatchPings Team
Framed browser window concept illustrating X-Frame-Options clickjacking defence

The X-Frame-Options response header controls whether a browser may display your page inside a <frame>, <iframe>, or similar embed. Without it (or a CSP frame-ancestors directive), another site can load your UI invisibly and trick users into clicking actions they never intended. That attack is called clickjacking.

For the attack model, see What is clickjacking?. This page is the header-focused guide: values, modern replacements, and how to confirm the header on a live security scan.

Allowed values

  • `DENY` - never allow framing, even by pages on the same origin.
  • `SAMEORIGIN` - allow framing only by pages from the same scheme, host, and port.
  • `ALLOW-FROM` - obsolete and ignored by modern browsers; do not rely on it.
Common configurationscode
X-Frame-Options: DENY
X-Frame-Options: SAMEORIGIN

Prefer CSP frame-ancestors for new work

Content-Security-Policy frame-ancestors is the modern control. It supports an explicit allow-list of parent origins and overrides X-Frame-Options when both are present in supporting browsers. Many teams still send X-Frame-Options for older clients while setting frame-ancestors as the source of truth.

CSP equivalentcode
Content-Security-Policy: frame-ancestors 'none'
Content-Security-Policy: frame-ancestors 'self'
Content-Security-Policy: frame-ancestors 'self' https://partner.example
Product embeds need SAMEORIGIN or an allow-list

If you intentionally iframe your own admin UI or a partner console, DENY will break that flow. Choose SAMEORIGIN or list the parent origins in frame-ancestors.

When each choice makes sense

  • Marketing sites and dashboards - usually DENY or frame-ancestors 'none'.
  • Legacy apps that self-embed - SAMEORIGIN while you migrate.
  • Trusted partner embeds - CSP allow-list only; never open framing to the whole web.

How to verify

  1. 1Fetch a representative HTML document (not only an API JSON route).
  2. 2Confirm X-Frame-Options and/or CSP frame-ancestors in the response.
  3. 3Try loading the URL in a cross-origin test iframe; the browser should block it when DENY/none is set.
  4. 4Re-check after CDN or reverse-proxy changes that might strip headers.

PatchPings grades framing controls with other HTTP security headers. Use features or a free scan after you deploy, then keep the policy in version control so the next release cannot silently drop it. For deeper CSP work, continue with the Content-Security-Policy setup guide.

#X-Frame-Options#Clickjacking#Headers#CSP

Keep reading

Dark abstract threat surface representing common browser-based web attacks
Security

What Is Clickjacking? XSS and CSRF Explained

2 min read
Abstract network nodes suggesting layered HTTP security header protections
Security

What Are HTTP Security Headers? A Complete 2026 Guide

3 min read
Developer monitor showing configuration work for a Content-Security-Policy rollout
Dev guides

Content Security Policy Setup: Staged Rollout Without Breaking Your Site

2 min read
PatchPings

Start scanning. It’s free.

Download PatchPings and run your first full security scan in under a minute. No credit card, no catch.

GET IT ONGoogle Play

Free for all signed-in users · Guest mode available · v1.0.0