AI TOOLS

Share a page with an embedded Google Map as a link

An event page, venue page or store locator from Claude or ChatGPT with a map in it. Which Google Maps addresses load inside a page and which are refused, why a "use my location" button does not work in the share view, and how to send the page as a link.

4 min read·

Ask Claude or ChatGPT for an event page, a venue page or a list of store locations and it often adds a Google Map as an <iframe>. Sometimes the map box shows a grey page with "www.google.com refused to connect" instead.

The tests below were run in Chrome, with each map address placed in an <iframe> on a page served over http.

Use an embed address, not a Maps page address

Google serves the normal Maps pages with a header that forbids showing them inside another page. Only the embed addresses are allowed in an <iframe>. Tested:

  • ✓google.com/maps/embed?pb=...: loaded. This is the address Google Maps gives you under Share, Embed a map.
  • ✓maps.google.com/maps?q=PLACE&output=embed: loaded. Google redirects it to a /maps/embed address. Useful when you want to type the place yourself.
  • ✓google.com/maps/place/PLACE: refused to connect.
  • ✓google.com/maps/search/PLACE: sent the same frame-blocking header as /maps/place/.
  • ✓openstreetmap.org/export/embed.html?bbox=...: loaded, with no Google account or API key involved.

Getting the embed code

In Google Maps, search for the place, choose Share, then Embed a map, and copy the HTML. Paste it into your page in place of the map the AI tool wrote.

To get it from an AI tool instead, ask: "Embed the map with an iframe whose src is https://maps.google.com/maps?q=ADDRESS&output=embed, with the address URL-encoded." Replace spaces in the address with + signs.

"Use my location" does not work in the share view

Store locators and "find the nearest" pages sometimes ask for the visitor's location with navigator.geolocation. The FileShare Pro share view blocks location access for the pages inside it, along with camera and microphone, and a page cannot switch that back on. Tested with the same headers and frame setup: the location request failed at once with "Geolocation has been disabled in this document by permissions policy", and no prompt appeared.

The raw page link (the arrow on the file card) shows the file on its own. There the browser asks the visitor for permission as usual. Tested: the same page opened on its own reported the permission as "prompt".

If the page needs the visitor's location, send the raw page link, or give the page a search box for a town or postcode as well so it works in both places. A plain embedded map needs no permission and works in the share view.

Upload it and send the link

Drag the HTML file onto the FileShare Pro dashboard and copy the link. Viewers need no account, and they can leave comments on the page, such as "the pin is on the wrong entrance".

Links on the page that go to other sites, such as a "Get directions" link you add yourself, open in a new tab in the shared view, so the page stays open behind them.

If the venue changes, upload the new file over the old one and the link stays the same: updating a shared link without changing it. Related: sharing a Folium or Leaflet map, sharing an RSVP page and why a page that works in chat breaks when hosted.

Frequently asked

Do I need a Google Maps API key?

Not for the two embed addresses above. Both loaded without a key in the test. A map built with the Google Maps JavaScript API, with custom markers and code, needs a key.

Does the page with the map show up in Google?

No. Shared files carry a noindex header: keeping a preview out of Google.

Got a page to share?

Drop the file, copy the link — live in seconds, free plan included.

Start sharing free