accounts.google.com refused to connect
Why Google sign-in will not load in a frame, and what to do. Headers checked 2026-11-30.
The Google sign-in page never loads inside a frame. An embedded page tried to sign you in there. Developers: use the Sign in with Google button, which opens a pop-up by default. Everyone else: open the page in its own tab and sign in.
What the site sends
- Framing header
- X-Frame-Options: DENY
- Checked URL
https://accounts.google.com/- Checked on
- 2026-11-30
Why it happens
Google sends X-Frame-Options: DENY on its sign-in pages, so no other site can show them in a frame.
Other Google products send a frame here when it needs a Google session and has none. Chrome then names accounts.google.com in the error, even if your iframe pointed at docs.google.com or drive.google.com, because it names the host of the response that was blocked.
Fix it if you are embedding Google sign-in
Use Google Identity Services
Load the Google Identity Services library and render the Sign in with Google button. Its default mode runs sign-in in a pop-up window. In a top-level page you can set data-ux_mode="redirect" instead.
<script src="https://accounts.google.com/gsi/client" async></script>
<div id="g_id_onload"
data-client_id="YOUR_CLIENT_ID"
data-callback="onSignIn"></div>
<div class="g_id_signin" data-type="standard"></div>Make embedded Google files public
If the frame is a Doc, Sheet, Slides deck or Drive file, the trip to sign-in means the visitor cannot open the file. Publish it to the web or share it with anyone who has the link.
If you only see the error
Being signed in to more than one Google account is a common cause. Google may not know which account the frame should use, and can fall back to your default account. If that account cannot open the file, the frame cannot show it. Open the page in a private window and sign in with only the account that has access. To fix it for good, sign out of every Google account, then sign in first with the one you need: in many cases Google treats the first account you sign in with as the default.
If you use one account and it still fails, check third-party cookies. A frame from Google on another site is third-party, so a browser setting or an extension that blocks third-party cookies hides your Google session from it. Allow third-party cookies for the site you are on, or turn the blocking extension off for it.
FAQ
Can I show the Google sign-in page in an iframe?
No. The sign-in pages send DENY, which blocks every frame.
Other sites that refuse to connect
- www.youtube.com refused to connect (YouTube)
- docs.google.com refused to connect (Google Docs)
- drive.google.com refused to connect (Google Drive)
- login.microsoftonline.com refused to connect (Microsoft sign-in)
- www.google.com refused to connect (Google Search)
- script.google.com refused to connect (Google Apps Script)
- sites.google.com refused to connect (Google Sites)
- mail.google.com refused to connect (Gmail)
- analytics.google.com refused to connect (Google Analytics)
- www.linkedin.com refused to connect (LinkedIn)
- www.canva.com refused to connect (Canva)
- www.facebook.com refused to connect (Facebook)