Neova고급 SEO 플랫폼

클릭재킹 방어 누락

Neova에서는 크롤링 자체에서 실행됩니다. 따로 설정할 것이 없습니다.

규칙 최종 검토: 2026년 10월 17일 · 가이드 업데이트: 2026년 6월 9일

다른 사이트가 이 HTML 페이지를 숨겨진 프레임에 로드해 방문자가 그 위를 클릭하도록 속일 수 있습니다. MDN에 따르면 브라우저는 X-Frame-Options ALLOW-FROM과 meta 태그에 설정된 X-Frame-Options를 무시합니다.

해 볼 수 있는 조치

Content-Security-Policy 헤더에 frame-ancestors 지시어를 보내거나, DENY 또는 SAMEORIGIN으로 설정한 X-Frame-Options를 보내세요.

Neova가 플래그를 지정하는 이유

  • frame-ancestors나 X-Frame-Options가 없으면 어떤 사이트든 이 페이지를 숨겨진 프레임에 불러와 방문자가 클릭하도록 속일 수 있습니다(클릭재킹).
  • 브라우저는 메타 태그로 설정한 X-Frame-Options와 ALLOW-FROM 값을 무시하므로, 헤더나 CSP만 페이지를 보호합니다.
  • Lighthouse는 권장사항에서 이를 진단하며, 검색엔진 규칙이 아니라 보안 관례입니다.

출처

전체 가이드

이 부분은 현재 영어로만 제공됩니다.

TL;DR

Send a valid X-Frame-Options header (use SAMEORIGIN, or DENY if your pages are never framed) and back it up with a Content-Security-Policy frame-ancestors directive to stop attackers from embedding your site in a hidden iframe and tricking your visitors.

What the X-Frame-Options Header Is

X-Frame-Options is an HTTP response header that tells the browser whether your page is allowed to be rendered inside a <frame>, <iframe>, <embed> or <object>. When the header is missing or contains an invalid value, the browser applies no restriction, so any third party can load your page inside their own frame. Crawlers such as Screaming Frog and Sitebulb flag this as a security-header issue because the protection it provides is simple to add and widely expected on production sites.

The header accepts only two valid values today: DENY and SAMEORIGIN. Anything else, including a blank value or the long-obsolete ALLOW-FROM syntax, counts as invalid and leaves the page unprotected.

The Clickjacking Risk

Clickjacking is an attack where a malicious site loads your page inside an invisible or disguised iframe, layers its own content on top, and tricks a user into clicking something they cannot see. The user believes they are interacting with the attacker's page, but their clicks land on your framed page, potentially confirming a payment, changing a setting, or approving a permission. OWASP describes this as a UI redress attack, and a properly set X-Frame-Options header (or its CSP equivalent) is the standard defence because it stops the browser from rendering your page in the attacker's frame in the first place.

Why It Matters for SEO

X-Frame-Options is not a direct Google ranking factor, but it still belongs in a technical-SEO audit for three reasons. First, automated SEO crawlers report it, so leaving it unset keeps a visible warning in your reports and clutters your issue backlog. Second, security headers are part of the broader trust and site-quality signals that experienced auditors expect on a healthy domain. Third, and most concretely, a successful clickjacking attack can damage your brand and your users' trust, which has real downstream effects on the engagement and reputation signals that do influence search performance. Fixing it is fast, low-risk, and removes noise from every future crawl.

DENY Versus SAMEORIGIN

The two valid values differ in how strict they are:

DENY

The page cannot be loaded in a frame by anyone, including your own domain. Choose this when no part of your own site ever needs to embed the page. It is the most restrictive and safest default for pages such as login screens and account settings.

SAMEORIGIN

The page can be framed only when every ancestor frame shares the same origin as the page itself. This is the common choice for ordinary websites, because some themes, builders, and preview tools legitimately frame your own pages from your own domain. If you are unsure which to pick, SAMEORIGIN is the safe, compatible default.

Relationship to CSP frame-ancestors

X-Frame-Options has been obsoleted in favour of the frame-ancestors directive from the Content-Security-Policy Level 2 specification. frame-ancestors does everything X-Frame-Options does and more: it lets you whitelist several specific domains, supports wildcards, and is the approach OWASP now recommends. Crucially, when a browser supports frame-ancestors and both headers are present, frame-ancestors wins and X-Frame-Options is ignored. The practical takeaway is to set both: frame-ancestors as the modern primary control, and X-Frame-Options as a fallback for any older browser that does not understand CSP framing rules.

How to Diagnose It

Check the response headers for any page. From the command line, request only the headers and look for the X-Frame-Options line:

curl -sI https://yourdomain.com/ | grep -i x-frame-options

# Expected output:
# x-frame-options: SAMEORIGIN

If the line is absent, the header is missing. If it shows ALLOW-FROM or an empty value, it is invalid. You can also open your browser DevTools, go to the Network tab, click the document request, and read the Response Headers panel.

How to Fix It

Apache

Add this to your .htaccess file or virtual host. The mod_headers module must be enabled.

<IfModule mod_headers.c>
    Header always set X-Frame-Options "SAMEORIGIN"
    Header always set Content-Security-Policy "frame-ancestors 'self'"
</IfModule>

Nginx

Add this inside the relevant server or location block, then reload Nginx.

add_header X-Frame-Options "SAMEORIGIN" always;
add_header Content-Security-Policy "frame-ancestors 'self'" always;

WordPress

If you cannot edit server config, add the header in PHP via your theme's functions.php or a small plugin.

add_action( 'send_headers', function () {
    header( 'X-Frame-Options: SAMEORIGIN' );
    header( "Content-Security-Policy: frame-ancestors 'self'" );
} );

Many security plugins can also set these headers from a settings page if you prefer not to touch code.

Common Mistakes

The most frequent error is still using ALLOW-FROM. This directive is obsolete: modern browsers, including Chrome, Firefox (since version 70), and Safari, do not recognise it and will ignore the entire header, leaving your page with no protection at all. If you need to allow framing from a specific external domain, use CSP frame-ancestors with that domain instead. Other common pitfalls include typos such as SAME-ORIGIN with a hyphen (invalid), setting the header twice with conflicting values, and forgetting the always keyword in Nginx or Apache so the header is dropped on error responses.

FAQ

Q: Should I use DENY or SAMEORIGIN?

A: Use DENY when the page never needs to be framed by anyone, including your own site. Use SAMEORIGIN when your own domain may legitimately embed the page. SAMEORIGIN is the safer default for most websites.

Q: Do I still need X-Frame-Options if I set CSP frame-ancestors?

A: frame-ancestors is the modern replacement and takes precedence in browsers that support it. Setting X-Frame-Options as well provides a fallback for older browsers, so the common recommendation is to send both.

Q: Will adding this header break my site?

A: It only affects whether your pages can be embedded in frames. As long as nothing legitimately frames your pages from another origin, SAMEORIGIN is safe. Test any pages you intentionally embed elsewhere before rolling out DENY.

Need a full technical audit?

Neova runs deep crawls that catch issues like this across your whole site.

내 사이트에서 찾아보기

Neova는 크롤링할 때마다 이 점검과 다른 모든 점검을 실행하고, 수정 방법을 팀을 위한 티켓으로 작성합니다.

  • Mac, Windows, Linux용 데스크톱 앱
  • 출처가 함께 있는 696개 점검 전체
  • Search Console과 Analytics 4를 읽기 전용으로 연결
  • Jira, Linear, Asana로 티켓 보내기

Neova 다운로드 Desktop Free 플랜 또는 Solo 14일 무료, 카드 불필요.

보안 점검 전체 · 가이드 · 점검 라이브러리

작성: Neova Labs · 점검 라이브러리로 돌아가기