Why Isn’t My Google Maps Embed Loading?

My embedded Google Map suddenly stopped loading on my website and now shows a blank area. I’ve checked the embed code and API settings, but I can’t find the issue. What should I check to fix it?

A map that fails on every page usually points to the Google Cloud project or API key, while a map that fails only on your live domain is more often a referrer, security-header, or layout issue. Open the browser developer tools first and check both Console and Network while reloading. Google’s error code is usually much more specific than the blank box.

Verify that the correct API is enabled, the key has not been replaced, and the allowed HTTP referrers cover the exact versions visitors use, including HTTPS, www, non-www, and any subdomains. A recent domain redirect or a stricter Referrer-Policy can break a previously valid key. For an iframe using the Maps Embed API, set referrerpolicy='strict-origin-when-cross-origin' so Google receives enough referrer information to validate it. If you use the JavaScript API, check the project’s billing status and key restrictions too.

If there is no Google error, inspect the page itself. Confirm the map container still has a real height, temporarily disable ad blockers or consent scripts, and check whether your Content Security Policy blocks Google’s scripts, frames, images, or connections. Testing the same embed in a bare HTML page is a quick way to separate a Google configuration problem from a theme or plugin conflict.

If the iframe URL loads normally when opened by itself, the Google project probably isn’t the failure point. Inspect the live iframe under Elements, not the embed code in your editor. Page builders, cookie tools, and lazy-load plugins sometimes replace src with data-src, leave it as about:blank, or add a restrictive sandbox attribute.

@data_lena60 is right about checking developer tools, but I’d temporarily disable any caching, optimization, or iframe lazy-loading feature before changing the API key. Then purge the site and CDN caches and test in a private window. A plain iframe on an empty test page can work while the published page keeps serving stale or rewritten markup, which makes this look like a Maps configuration issue when it isn’t.

Check your Content Security Policy. If the console shows “Refused to frame,” a security plugin or hosting change may be blocking the Google Maps domain under frame-src, even though the iframe itself is valid.

Don’t keep changing API keys until you know the failure affects everyone. Test the page on a phone using cellular data, not the same Wi-Fi. Corporate firewalls, private DNS filters, parental controls, and router-level ad blocking can block Google Maps while leaving a perfectly convincing blank rectangle.

If it works on cellular but not your normal connection, the website is probably fine. Check the browser’s Network tab for blocked or canceled Google requests, then review DNS or firewall allowlists. Google does occasionally make websites look broken when the real culprit is an overenthusiastic network filter doing exactly what someone told it to do.

Don’t touch billing or regenerate anything until you know which kind of embed you actually have. That sounds obvious, but a lot of people panic over API keys when their map is just the free copy-paste iframe from the Share menu, which has no key and no billing tied to it at all. If that’s your case, half the advice about referrer restrictions and project settings doesn’t apply to you, and you’ll waste an afternoon poking at a dashboard that was never the problem.

So first thing, look at the actual iframe src. If it’s the plain share embed, a blank box usually means the place ID or coordinates went stale, someone edited the URL, or a script on the page is mangling it, which is basically what @foxhq was pointing at with the data-src swap. If it’s the Embed API with a key in the URL, then yeah, @data_lena60’s referrer checklist is the right path. And if you’re on the JavaScript API and see a faint gray map with ‘For development purposes only’ stamped across it, that’s not a layout bug, that’s billing or a disabled key talking. Different failure, different fix.

The thing people forget is that Google quietly requires a billing account on file for the JS API even inside the free usage tier, and an expired card or a project that got flagged will grey the map out without a loud error. Worth ruling out before you rebuild anything. @its_gadget’s cellular test is the fastest sanity check though, so I’d honestly do that in thirty seconds before digging into any of this.

A blank rectangle does not always mean the map failed to load. It may be loaded underneath an invisible overlay, or an animation may have left the iframe at opacity: 0. This is especially common after changing a theme, popup plugin, sticky header, or responsive layout.

In DevTools, select the iframe and check its computed styles plus every parent container. Look for:

  • display: none
  • visibility: hidden
  • opacity: 0
  • zero width or height
  • position: absolute combined with bad coordinates
  • a transform that moves it off-screen
  • an overlapping element with a higher z-index
  • overflow: hidden on a parent with collapsed dimensions

Temporarily disable the page’s CSS in DevTools. If the map suddenly appears as an ugly but working iframe, stop changing API settings. The problem is in the site styling. You can then re-enable styles in sections until the rule hiding it becomes obvious. Another quick test is to hide the elements above the map one at a time. Cookie banners and transparent popup backdrops are frequent offenders because they can remain on the page after the visible notice closes.

Pay attention to entrance animations and tab, accordion, or modal layouts. A map initialized while its container is hidden can end up with incorrect dimensions, and some page builders never run their resize code when the section becomes visible. Move the same iframe temporarily into a normal, always-visible content area. If it works there, the surrounding component is the issue. For a JavaScript map, trigger a resize or initialize the map only after the tab or modal has opened.

@foxhq’s standalone iframe test is useful, but I would pair it with the Network result on the actual page. If the request completes and the iframe works by itself, that narrows the failure to the published DOM, CSS, or script timing. If no iframe request happens at all, then lazy loading, consent handling, or JavaScript is preventing the load. If the request happens but is refused, then the CSP, referrer, key, and billing checks already mentioned become relevant.

After making a fix, test at desktop and mobile widths. Responsive rules often affect the map only below a particular breakpoint, so correcting the desktop container can leave mobile visitors staring at the same blank space.

Check the iframe URL for http:// before touching Google Cloud. If your site recently switched to HTTPS, the browser may block an older HTTP map embed as mixed content and leave what looks like an empty box.

The confusing bit is that the embed can still open by itself, since it is no longer being loaded inside a secure page. Look for a “Mixed Content” message in the console. If you find one, regenerate the iframe from Google Maps rather than only editing the protocol, then replace the old embed and clear the page cache.

Don’t assume Google is rejecting the request if your site builds the map from CMS fields or JavaScript. A missing address, empty place ID, or latitude value that now outputs undefined can stop initialization while leaving the container completely blank.

Replace the dynamic values temporarily with a known address or hardcoded coordinates. Then inspect the rendered page source, not the editor, and search for empty parameters, null, NaN, or broken JSON. If the test location works, the API key and embed are probably fine. Trace the data feeding that specific map.

For a JavaScript map, check whether a recent optimization change added async or defer and caused the Google script to run before your initialization function exists. The Console may show something like “callback is not a function” rather than a Maps-specific error. That is a script-order problem, so regenerating keys or changing billing will not fix it.