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:
- Open your map editor.
- Go to Options → File Hosting → Update Hosted Files.
- Copy the embed code that appears.
- 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.