On this page
What this issue is
An iframe is a window on your page that shows another page, often a form, calendar or payment widget. Browsers only show that other page if its server agrees to be framed. Two response headers control this: X-Frame-Options (older, values DENY or SAMEORIGIN) and the frame-ancestors part of Content-Security-Policy (newer, lists allowed parent sites).
A second case exists too. Your own site may send a CSP with frame-src or child-src that does not list the embed provider. Then the browser blocks the frame from your side.
| Header | Set by | What it controls | Typical console message |
|---|---|---|---|
| X-Frame-Options: DENY or SAMEORIGIN | Site being framed | Whether any or only same-origin pages may frame it | Refused to display '...' in a frame because it set 'X-Frame-Options' to 'deny' |
| CSP frame-ancestors | Site being framed | Which parent origins may frame it | Refused to frame '...' because an ancestor violates the following Content Security Policy directive |
| CSP frame-src / child-src | Your page | Which origins your page may frame | Refused to frame '...' because it violates the following Content Security Policy directive: frame-src |
Why it costs you leads or sales
The page looks normal, but the form, calendar or payment box is empty or shows a grey sad-face icon. Visitors cannot submit anything, so every click on your ads or emails to that page is wasted. Nothing errors visibly for you, so it can run for weeks. It often starts after a security plugin, CDN rule or provider change, not after anything you edited on the page.
- Ad clickVisitor lands on page
- Page loadsYour layout renders fine
- Iframe requestHeader forbids framing
- Form submitNo form to fill in
- Lead / conversionNever recorded
The page loads, but the framed form never renders.
The browser obeys the header and shows an empty frame.
How to check if your site has it
Open the page in a private window
Look at the embed area. A blank box, a grey icon or 'refused to connect' points to this issue.
Open the browser console
Press F12, open the Console tab and reload. Look for 'Refused to display' or 'Refused to frame'. The message names the header and the URL.
Inspect the response headers
In the Network tab, click the iframe's document request and read Response Headers for x-frame-options and content-security-policy.
Or test from a terminalCustom code
Run the command below against the iframe's src URL.
curl -sI https://embed.example.com/form/123 | grep -i -E 'x-frame-options|content-security-policy'How to fix it
Pick the case that matches your console message. You cannot change another company's headers, so if a third party blocks you, use their supported embed code or a link.
Case A: you own the framed page
Remove X-Frame-Options (or change DENY to SAMEORIGIN if the parent is on the same origin) and set frame-ancestors to list the parent sites that may embed it.
Case B: a third party owns it
Use the provider's official embed snippet, which is built to be framed. Check that your domain is on any allowed-domains list in their settings. If framing is not supported, link or open the form in a new tab.
Case C: your own CSP blocks the provider
Add the provider's origin to frame-src (or child-src) in your Content-Security-Policy.
# remove the old header, then set CSP
add_header Content-Security-Policy "frame-ancestors 'self' https://www.example.com" always;Header unset X-Frame-Options
Header set Content-Security-Policy "frame-ancestors 'self' https://www.example.com"Check security plugins
Plugins such as security or hardening tools often add X-Frame-Options. Look for a clickjacking or security headers setting and relax it for the framed page.
Check server or CDN rules
Review .htaccess, your host's header settings and CDN rules for X-Frame-Options or CSP.
Know the limit
Shopify sets its own framing headers on store pages and checkout, and you cannot edit them. Use the app's or provider's supported embed, or link out.
Check theme code
If a third-party widget is blank, confirm you pasted the provider's current embed code in the theme or section.
Use the provider's embed
Add it with an Embed element. If the provider refuses framing, link to the form instead.
Custom headers
Check any proxy or CDN in front of the site that adds security headers.
Check embed settings
Use the official form or calendar embed code from the builder. If you frame a GoHighLevel page on your own site, test with the provided embed rather than a raw page URL.
Use an Embed element
Add the provider's code via the Embed code option. Wix cannot change the third party's headers, so unsupported sites need a link or button instead.
Use a Code block
Paste the provider's embed code in a Code block. If it stays blank, the provider is blocking framing; use a button linking to the form.
Check injected frames
If a Custom HTML tag injects the iframe, verify the src and that the tag fires on the right page.
Set headers in one place
Set frame-ancestors for pages meant to be embedded, and frame-src on your own pages for each provider you embed. Avoid sending both X-Frame-Options and conflicting CSP; modern browsers prefer frame-ancestors.
Blocked
- X-Frame-Options: DENY
- Console says Refused to display in a frame
- Visitors see an empty box
Allowed
- frame-ancestors lists your own domain
- Form renders inside the page
- Submissions arrive
How to confirm it's fixed
- Hard reload the page in a private window; the form appears.
- The console shows no 'Refused to display' or 'Refused to frame' messages.
- curl shows the headers you intended.
- Check Safari, Chrome and a phone, not only one browser.
- Submit a test entry and confirm it reaches your inbox or CRM.
How to prevent it happening again
These blocks usually appear after a change you did not connect to the form: a new security plugin, a CDN or host header rule, a provider policy update, or a stricter site-wide CSP.
- Keep a list of every embedded provider and its origin.
- Review frame-src when you add or change an embed.
- Retest embedded pages after plugin, CDN or hosting changes.
- Subscribe to provider status or changelog emails.
- Run the real journey on a schedule, not just once after launch.
Day 0
A security plugin or CDN rule adds X-Frame-Options: DENY.
Day 0
Page still loads; embedded form is blank.
Day 10
Someone notices leads have dropped.
Day 11
Header is corrected and the form returns.
How FunnelGuard handles this
FunnelGuard detects this today. A robot visitor runs your real journey on a schedule, such as landing on the page and filling in the embedded form. If the frame step fails because the frame never loads, the check fails, and the console errors from the page help point to the likely cause. A failure is re-checked from a second region before one alert goes out by email, Slack, Teams, WhatsApp, webhook or PagerDuty, with a screenshot and a likely cause.
Test traffic is marked (utm_source=funnelguard, fg_test=1) and never bypasses CAPTCHAs or bot protection. The Free plan covers 1 site and 2 journeys with daily checks and no card. Paid plans start at $39/month with a 3-day free trial.
Questions people ask
Why is my iframe showing 'refused to connect'?
The page you are framing sent an X-Frame-Options or CSP frame-ancestors header that does not allow your site to embed it. The browser obeys and shows an empty box. Open the console to see which header and URL is responsible.
How do I fix 'Refused to display in a frame because it set X-Frame-Options to deny'?
If you own the framed page, remove the header or switch to a CSP frame-ancestors list that includes your parent site. If a third party owns it, you cannot change it; use their official embed code or link to the page.
What is the difference between X-Frame-Options and frame-ancestors?
Both say who may frame a page. X-Frame-Options is the older header with only DENY or SAMEORIGIN. frame-ancestors is part of CSP and can list specific allowed sites, and modern browsers prefer it when both are set.
Why does my embedded form work for me but not for visitors?
You may be testing in a browser or logged-in state that differs from visitors, or a CDN or security rule may apply only to some requests. Test in a private window and in other browsers, and compare response headers.
How do I check which header blocks my iframe?
Open the browser console and read the 'Refused to display' message, or check the Network tab response headers for the iframe URL. You can also run curl -sI on the iframe URL and look for x-frame-options and content-security-policy.
Is it safe to allow my site to frame a page?
Yes, if you only list sites you trust in frame-ancestors. Avoid allowing every site, especially on pages with logins or payments, because that opens the door to clickjacking.
Can I embed a page that blocks framing?
Not reliably, and you should not try to bypass the block. Use the provider's supported embed, ask them to allow your domain, or link visitors to the page directly.
Can FunnelGuard tell me when an iframe gets blocked?
Yes. It runs your real journey on a schedule, and a frame step that fails to load triggers a check failure. It re-checks from a second region and then sends one alert with a screenshot and a likely cause.
Related issues
- CNV-353Embedded form (HubSpot, Typeform, Jotform) doesn't loadFix guide
- CNV-355Iframe height fixed, submit button cut offFix guide
- CNV-356Embed form success message not visible to parent pageFix guide
- CNV-357Embedded form loses UTMs (parent params not passed)Fix guide
- CNV-358Third-party cookies blocked break embed (Safari ITP)Fix guide
- CNV-359Embed provider account suspendedFix guide