mail.google.com refused to connect
Why Gmail will not load in a frame, and what to do. Headers checked 2026-11-30.
Gmail cannot be embedded in another page. A dashboard, start page or extension tried to load it in a frame. Open Gmail in its own tab. To show mail inside your own app, use the Gmail API.
What the site sends
- Framing header
- X-Frame-Options: SAMEORIGIN and Content-Security-Policy: frame-ancestors 'self'
- Checked URL
https://mail.google.com/- Checked on
- 2026-11-30
Why it happens
mail.google.com sends X-Frame-Options: SAMEORIGIN and frame-ancestors 'self', so only pages on mail.google.com may frame it. A signed-out request is also sent on to Google sign-in, which sends X-Frame-Options: DENY.
Fix it if you are embedding Gmail
Link to Gmail
Open the inbox in a new tab.
<a href="https://mail.google.com/" target="_blank" rel="noopener">Open Gmail</a>Read or send mail with the Gmail API
For an app that shows messages, sign the user in with OAuth and call the Gmail API. You draw the interface yourself.
If you only see the error
A page or extension tried to show Gmail inside a frame. Open mail.google.com in a normal tab. If a start page or dashboard has a Gmail tile, change it to a link that opens a new tab.
FAQ
Is there a Gmail URL that loads in a frame?
Not that we found. Every mail.google.com response in our checks sent both framing headers.
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)
- accounts.google.com refused to connect (Google sign-in)
- 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)