Knowledge base / Platforms

Google Maps not working on Squarespace: how to fix it

Squarespace's map block doesn't use your Google API key, so most map block problems are fixed inside the block editor. Maps you've added with a code block are a separate case: they follow Google's normal key, billing and referrer rules.

Which kind of map do you have?

  • A map block. Added with Add block (or +) and then Map. You edit it with the pencil icon: the address goes in the Content tab and styling in the Design tab (Map Style, Show Labels, Show Terrain, Show Controls). There is no API key field. Squarespace provides the Google connection.
  • A code block or embed block. A Google Maps iframe or Maps JavaScript API code you pasted in yourself. Squarespace suggests this for maps with more than one pin, because a map block shows only one.
  • Site-wide injected code. A script added to the site's header through code injection, often by a developer or a store locator service.

Click the map in the editor. A map block opens with Content and Design tabs. A code block opens a code editor.

How to tell what's wrong

  • The map block shows the old location after you change the address: a stuck block. Squarespace's own fix is to delete it and add a new one.
  • The pin disappears on phones or narrow windows: the block resizes with the browser and can crop the pin out of view.
  • Your code block map is blank while you're logged in: Squarespace says embedded code sometimes doesn't display to logged-in editors as a security measure. Check logged out.
  • Grey box with “Oops! Something went wrong.” or “This page can't load Google Maps correctly.”: code that uses the Maps JavaScript API has a key or billing problem.
  • A Google message inside the map frame instead of a map: an Embed API iframe with a key problem.
  • Map missing for first-time visitors only: a consent tool is holding it back.

For code-based maps, the browser console names the problem. A typical failure looks like this:

Google Maps JavaScript API error: ApiNotActivatedMapError
https://developers.google.com/maps/documentation/javascript/error-messages#api-not-activated-map-error

Fixing a map block

  1. 01Open the page in the editor, hover over the map and click the pencil icon.
  2. 02In the Content tab, type the address again and pick one of Google's suggestions. Choosing a suggestion fills the address fields and drops the pin. Typing an address without picking a suggestion is a common reason the pin doesn't move.
  3. 03If Google has no suggestion for your address, the block can't place it. Squarespace's map block relies on Google Maps data. Try the street address of the building or a nearby landmark Google knows.
  4. 04If the block still shows the old location, delete the block and add a new map block with the same address. Squarespace's help recommends this, and to contact their support if a new block also fails.
  5. 05If the pin vanishes on mobile, drag the block's bottom handle to make it taller, then check in the editor's mobile view.
  6. 06Save the page and view it logged out.

Map blocks are Squarespace's responsibility from Google's side. If a fresh block on a fresh page shows nothing at all for every visitor, contact Squarespace support. There's no Cloud Console setting you can change for it.

Cookie banners and consent tools

Squarespace's built-in cookie banner restricts cookies from some third-party services connected to your site, and Squarespace is clear that it doesn't cover all of them. Its help pages don't say whether the banner affects map blocks, so test it rather than assume.

  1. 01Open the page in a private window and don't touch the banner. Note whether the map shows.
  2. 02Accept the banner and reload. If the map only appears now, consent is gating it.
  3. 03If you've added a third-party consent tool through code injection, check its settings for Google Maps or embedded content. These tools often replace map iframes with a placeholder until consent is given.
  4. 04Make sure the placeholder tells visitors how to load the map. A blank space reads as a broken site.

Fixing a code block map

First work out which method your code uses. Search the code for these strings:

In the codeMethodNeeds a key?
google.com/maps/embed?pb=Share embed copied from Google MapsNo
google.com/maps/embed/v1/Maps Embed APIYes, with Maps Embed API enabled
maps.googleapis.com/maps/api/jsMaps JavaScript APIYes, with Maps JavaScript API enabled

For a keyless share embed that has stopped working, generate a fresh one in Google Maps with Share → Embed a map and replace the old code. See replacing a broken iframe embed.

For code that uses a key, work through these:

  1. 01Open the live page logged out, press F12 and read the Console tab. Note the error code.
  2. 02Check the key's website restrictions in Cloud Console. Include your custom domain with and without www, and your squarespace.com site address if you view the site there. A key that only allows one of them fails on the others with RefererNotAllowedMapError. See the referrer guide.
  3. 03Enable the API your code calls in the project that owns the key. If the key has API restrictions, add that API to the key's list too.
  4. 04Confirm the project has an active billing account. Google requires one for Maps Platform keys.
  5. 05Re-paste the key into the code block. A key copied from an email or chat can carry a stray space or a cut-off end, which gives InvalidKeyMapError.
  6. 06Give the map a height. A div with no height draws nothing even when the API loads fine. See the zero-height container guide.
  7. 07Save and check logged out.
Don't load the API twice

If a map script sits in code injection and also in a code block, or a store locator service adds its own, the page loads the Maps JavaScript API more than once. Google logs “You have included the Google Maps JavaScript API multiple times on this page” and maps can fail unpredictably. Keep one loader for the whole site.

Confirm it is fixed

View the published page logged out in a private window, so you see what a first-time visitor sees, with no stored consent and no editor session. Check a phone-sized window too.

Then run a scan on the page. It loads the page in a clean session and lists the Google Maps requests and console errors it saw. That catches a code block map that only fails on your custom domain, or a second loader you'd forgotten about.

Common questions

Does the Squarespace map block need a Google API key?

No. The map block has no key field and Squarespace provides the Google connection. You only need your own key for maps you add with code that uses the Maps Embed API or Maps JavaScript API.

Why won't my Squarespace map update to the new address?

Pick one of Google's address suggestions rather than just typing the address, because selecting a suggestion is what drops the pin. If it still won't update, delete the map block and add a new one.

How do I show several locations on one Squarespace map?

A map block shows only one pin. Use several map blocks, or create a map in Google My Maps and embed it in a code block with its share embed code.

Why is my embedded map blank in the Squarespace editor?

Squarespace sometimes hides embedded code from logged-in editors as a security measure. Log out or use a private window to see what visitors get.

Check whether this is your error

A scan tells you in about twelve seconds, from a clean session.

Related articles