Google Maps embed not showing on your website: why it happens and how to fix it
A Google Maps embed usually fails because the wrong code was pasted, your editor or security settings block the iframe, a cookie banner is holding it back, or (for API maps) the key or billing is wrong. Check the browser console and the embed code first, and you will normally find the cause in a few minutes.
When a Google Maps embed is not showing, visitors see a blank gap, a grey box, or a message such as google.com refused to connect or Oops! Something went wrong. The map may work for you and fail for others, or work only after a cookie banner is accepted. The cause is almost always one of a handful of things, and most are quick to fix.
What you are probably seeing
| What you see | Likely cause |
|---|---|
| Blank space where the map should be | Embed code stripped by the editor, or blocked by security settings or a consent tool |
google.com refused to connect | A normal Google Maps page link was used instead of the embed code |
Grey map, Oops! Something went wrong or a For development purposes only watermark | API key or billing problem (Maps JavaScript API) |
| Map appears only after accepting cookies | Cookie consent tool blocking the iframe on purpose |
| Works for you, not for some visitors | Ad blocker, strict privacy settings, or a lazy loading script |
Why it matters
Most customers check a map before they visit or call. If it is missing, they cannot see where you are or how to get there, and a broken box looks careless. A map also supports the rest of your local presence: your address on the page should match your Google Business Profile, and the pin should point at the right place (see maps embed showing the wrong pin). A broken embed will not usually sink your rankings on its own, but it hurts trust and enquiries.
How to check your site for free
- Open the page in a private or incognito window, with no extensions. If the map shows there, the problem is an ad blocker, extension or saved browser data on your side.
- Try another browser and your phone on mobile data. Different results point to caching or a script that behaves differently by device.
- Right click the page, choose View page source, and search for
google.com/maps/embed. If it is missing, the code never reached the page, so the editor or a plugin removed it. - If the code is there, press F12 to open developer tools and look at the Console tab. Reload the page and read the red messages.
- Messages that mention
Refused to frameandContent Security Policymean your site's security header blocks Google. Messages mentioningInvalidKeyMapError,RefererNotAllowedMapErrororBillingNotEnabledMapErrormean an API key problem. - Check the address bar. If your site is
httpsand the map code starts withhttp://, browsers may block it as mixed content. It should start withhttps://.
Common causes and how to fix them
Wrong kind of link. A link copied from the browser address bar or the Share link will not work inside an iframe. On a desktop computer, open Google Maps, search for your business, click Share, choose the Embed a map tab and copy the HTML. The Embed option does not appear in the phone app, so use a computer.
The editor strips the code. Many visual editors remove iframes or turn them into plain text. Look for a Custom HTML, Code, Embed or HTML block, and paste the full <iframe ...></iframe> code there. If you see the code printed on the page as text, you pasted it into the wrong kind of block.
Security headers or a security plugin. If the console mentions frame-src or Content Security Policy, the allowed list must include https://www.google.com. This is set on the server, in a security plugin, or by your host or CDN. Ask whoever manages hosting to add it rather than turning protection off.
Cookie consent blocking. Many consent tools hide embedded maps until the visitor agrees to the relevant category, often marketing or functional. That is deliberate, and often needed for privacy law. Check the tool's settings for a placeholder option, so visitors see a message and a button instead of empty space.
API key or billing (custom maps). If a developer built the map with the Maps JavaScript API, the key must be valid, billing must be enabled on the Google Cloud project, the Maps JavaScript API must be switched on, and any website restriction must include your exact domain, with and without www. The simple iframe from the Share menu does not need a key.
Lazy loading or optimisation plugins. Speed tools sometimes delay iframes and never load them. Temporarily exclude the map, or turn off iframe lazy loading for that page, then test again.
A sizing problem. If the iframe has width or height set to 0, or sits inside a hidden tab or accordion, it may look missing. Fix the size in the code or theme settings.
Platform notes
Where things live depends on your theme and version, but these are the usual places:
- WordPress: use a Custom HTML block in the block editor. In the classic editor, use the Text or Code tab, not Visual. Our WordPress guide covers it in more detail.
- Wix: use the Embed or HTML iframe element, or the built in Google Maps element, and paste the code or address.
- Squarespace: use a Code block (with HTML mode on) or the built in Map block. Code blocks may need a paid plan.
- Webflow: use an Embed element and publish the site, because embeds often do not appear in the editor preview.
- Shopify: paste into a Custom Liquid section or the theme code, depending on your theme.
- Elementor: use the HTML widget, or Google Maps widget (which may ask for an API key).
- Google Tag Manager: a map should not be injected through a tag unless you know why. Put it in the page itself.
Confirm the fix worked
- Hard refresh the page, and clear any caching plugin or CDN cache.
- Test in a private window, on your phone, and in a second browser.
- Open the console again and confirm the red errors are gone.
- If you use a consent banner, test once as a new visitor (decline, then accept) and check that the map or its placeholder behaves as intended.
- Click the pin and confirm it shows your correct business name and address.
Stop it coming back
- Keep a note of where the map code lives and which method you used (iframe or API key).
- Re-test the contact page after theme, plugin or security header changes, and after changing consent tools.
- If you use an API key, set a reminder to check billing and referrer restrictions, and keep the key in an account the business owns.
- Keep your address consistent everywhere (NAP consistency explains why).
Week 9 of SiteMonday is the Google Business Profile check, and it comes with a written report and a ranked fix list, which helps you spot map and listing problems together. SiteMonday finds and explains problems; fixing them is up to you or your developer. You can read about week 9 for details.
Step by step for your platform
- Google Maps embed not showing on website on WordPress
- Google Maps embed not showing on website on Wix
- Google Maps embed not showing on website on Squarespace
- Google Maps embed not showing on website on Webflow
- Google Maps embed not showing on website on Shopify
- Google Maps embed not showing on website on Elementor
- Google Maps embed not showing on website on Google Tag Manager
Questions
Why does my Google Maps embed say google.com refused to connect?
Usually a normal Google Maps page link was used as the iframe address. Go to Share, then Embed a map on a desktop computer, and paste the full HTML it gives you.
Do I need an API key for a Google Maps embed?
Not for the simple iframe from the Share and Embed a map option. A key is needed for custom maps built with the Maps JavaScript API, and billing must be enabled on that project.
Why does the map only show after I accept cookies?
Your cookie consent tool is probably blocking the iframe until consent is given. Check its settings for a placeholder option so visitors see a message instead of a blank space.
Why is the map there in the code but not on the page?
Look at the browser console for errors. A Content Security Policy blocking Google, mixed http content on an https page, or a lazy loading plugin are common causes.
Can a missing map hurt my SEO?
Not directly in a big way, but it hurts trust and enquiries, and a map that points to the wrong place can confuse customers. Keep it consistent with your Google Business Profile.
Why does the map work for me but not for a customer?
Their ad blocker, privacy settings, or a cached copy of your page can cause it. Test in a private window and another device, and clear your site cache.