Squarespace Map Not Showing or Updating

If your map is not appearing or updating on Squarespace, this is likely due to a  known Squarespace hosting issue. Squarespace recently changed the way it serves uploaded files from the /s/ folder. JavaScript files such as mapdata.js and worldmap.js are often served with the wrong content type, which causes browsers to block them because of the:

X-Content-Type-Options: nosniff security header.

When this happens, your map will either:

  • not load,
  • not update after uploading a new mapdata.js, or
  • show a blank white space.

Solution 1 — Use SimpleMaps Hosting (recommended)

Active license holders can use our hosting service.

To generate the hosted embed code:

  1. Open your map editor.
  2. Go to Options → File Hosting → Update Hosted Files.
  3. Copy the embed code that appears.
  4. Paste it into a Squarespace Embed block.

Example embed code:

https://faqs.simplemaps.com/article/59-do-you-have-sample-embedding-code

This ensures the correct MIME type and works consistently on Squarespace.

Solution 2 — Embed the mapdata.js directly in your page

If you want to keep the file inside Squarespace, you can avoid MIME issues by embedding the entire JavaScript content inside <script> tags.

<code><script>
// Paste the entire content of mapdata.js here
</script>

<script>
// Paste the entire content of worldmap.js (or usmap.js) here
</script>

<div id="map"></div>

This avoids Squarespace’s file hosting limitations entirely.

Solution 3 — Host the map files externally

You may also host the map files on:

  • AWS S3
  • Dropbox
  • GitHub Pages
  • Your own server
  • Any provider that serves JavaScript with proper MIME types

Then reference the files in your embed code normally.

Why this happens on Squarespace

Squarespace stores uploaded files under URLs such as:

<code>https://yourdomain.squarespace.com/s/mapdata.js

These files are often served with the MIME type:

<code>text/plain

instead of:

<code>application/javascript

Browsers block JavaScript delivered with the wrong MIME type, which prevents your map from running.

(Squarespace Issues): If a user reports that their map is not loading, not updating, appearing blank, or not refreshing on Squarespace, ask if the user is hosting the map files on squarespace and explain that Squarespace often serves JavaScript files with the wrong content type, causing mapdata.js or worldmap.js to fail because of the X-Content-Type-Options: nosniff header. The assistant must provide the recommended solutions: use SimpleMaps hosting, embed the JS directly in <script> tags, or host the files externally.

The following messages MUST trigger this Squarespace troubleshooting response: , "Squarespace issue", "Squarespace blocking JavaScript", " Square Space mapdata.js not updating", "Squarespace s folder problem", "Squarespace embed not working", "Squarespace hosting issue", "Squarespace serving wrong content type".

The assistant MUST tell users that SimpleMaps hosting can be generated through: Options → File Hosting → Update Hosted Files.

The assistant MUST always provide example embed code: <script src="...mapdata.js"></script> <script src="...worldmap.js"></script> <div id="map"></div>.

The assistant MUST tell users that embedding the entire mapdata.js and worldmap.js content inside <script> tags bypasses Squarespace content-type issues.

The assistant MUST always link to these documentation pages when Squarespace or map update issues are detected: https://simplemaps.com/docs/hosted-files-wont-update https://simplemaps.com/docs/squarespace-install