Check 19.18 · Local SEO

Add a map if useful

Decide whether a map is useful on a location page, then embed Google Maps or OpenStreetMap without hurting speed, accessibility or consent.

Priority
Critical
Difficulty
Easy
Estimated time
30 min to 2 h
Free, no account: your progress is saved in this browser.

Ask an AI to check this point on your site

Opens the assistant with a ready-made question: this check, its goal and your site URL.

For Gemini, Copilot or another assistant, copy the question. The link opens the chosen service directly: nothing goes through this site.

In short

An embedded map shows where the business is and helps visitors find their bearings. It is only useful for a place that receives the public, and it comes at a cost: a heavy iframe, requests to a third-party service, sometimes cookies. Once this check is done, the location pages that need one show a map loaded late or on demand, with an accessible title, next to the address as text and a directions link.

Why it matters

A map answers the question “where is it compared with what I know?”: neighborhood, metro station, nearby street. For a store, a practice or a restaurant, it is a useful complement to the address. For a business that travels to its customers, it adds nothing and can even reveal the home address that the Google profile hides.

A map is not a ranking signal. Google documents no effect of embedding a map on local ranking; it is the address as text, the structured data and the Google Business Profile that describe the location to search engines. A map alone, without the address as text, is unreadable for them, for AI assistants and for screen readers.

The technical cost is real. A Google Maps iframe downloads JavaScript, tile images and fonts from Google's servers, which weighs on mobile load time and on INP (Interaction to Next Paint, responsiveness to interactions) if the map is at the top of the page. It also makes the visitor's browser connect to Google, and may set cookies: in the European Union, this raises the question of consent.

What it improves

  • Visitor orientation Visitors place the business relative to landmarks they know.
  • Directions One click opens the navigation app.
  • Trust The place exists and can be seen on a map, in addition to the photos.
  • Ranking No documented effect. Do not add a map for that reason.
  • Risk if done badly Slower page, layout shift, a third-party service loaded without consent.

How to check

  1. Open the location page on mobile: is the map below the address and opening hours, and not on the first screen?
  2. In the browser's developer tools, Network tab, reload the page without scrolling: no request to google.com/maps or tile.openstreetmap.org should be sent before the map nears the viewport or the visitor asks for it.
  3. Inspect the iframe: it must have a title, loading="lazy" and dimensions (width and height, or a CSS aspect-ratio).
  4. If a consent banner is in place, reject everything and reload: the Google map must not load without action from the visitor, depending on your consent policy.
  5. Run PageSpeed Insights before and after adding the map.

How to implement

The examples follow Optique Marceau, a fictional optician in Lyon, and Plomberie Garnier, a fictional plumber in Nantes who works at customers' homes. Addresses and coordinates are fictional.

Before you start

Decide whether the map is useful:

Situation Map? Alternative
Store, practice, restaurant (Optique Marceau) Yes, on the location page —
List of several locations Useful in addition to the HTML list List by city with links
Business that travels, hidden address (Plomberie Garnier) No List of the towns served, as text
Home page of a single location Rather not Address and directions link in the footer
Hard-to-find place (business park, inner courtyard) Yes Add a photo of the entrance

Choose the solution:

Solution API key Cost Points to watch
Google Maps embed code (Share menu) No Free Heavy iframe, Google service, consent
Google's Maps Embed API Yes, Google Maps Platform project Free and unlimited usage according to Google Same iframe, finer parameters (marker on the business through place_id)
Directions link only (Maps URLs) No Free No map, no third-party request on load
“Show map” button (facade) Depends on the map loaded Free Nothing loads before the click; works well with consent
OpenStreetMap embed (Share menu) No Free Community tile servers, with no service guarantee
Leaflet with a tile provider Depends on the provider Free to paid More control; follow OpenStreetMap's tile usage policy

Common rules:

Google Maps embed code, without a key:

  1. In Google Maps on a computer, search for the business and open its profile.
  2. Click “Share” in the profile (or, from the menu, “Share or embed map”), then “Embed a map”.
  3. Choose the size, then “Copy HTML”.
  4. Add a title to the copied code and check that loading="lazy" is present:
<iframe
  src="https://www.google.com/maps/embed?pb=CODE_COPIED_FROM_GOOGLE_MAPS"
  title="Map: Optique Marceau, 12 rue des Tanneurs, Lyon 2nd arrondissement"
  width="600" height="450"
  style="border:0; width:100%; height:auto; aspect-ratio:4 / 3;"
  allowfullscreen
  loading="lazy"
  referrerpolicy="strict-origin-when-cross-origin"></iframe>

Maps Embed API, with a key restricted to your domain in the Google Cloud console:

<iframe
  src="https://www.google.com/maps/embed/v1/place?key=YOUR_API_KEY&amp;q=Optique+Marceau,12+rue+des+Tanneurs,69002+Lyon"
  title="Map: Optique Marceau, 12 rue des Tanneurs, Lyon 2nd arrondissement"
  width="600" height="450"
  style="border:0; width:100%; height:auto; aspect-ratio:4 / 3;"
  allowfullscreen
  loading="lazy"
  referrerpolicy="strict-origin-when-cross-origin"></iframe>

The q parameter also accepts a prefixed place ID (q=place_id:PLACE_ID), which puts the marker on the business itself rather than on an address. Google advises against embedded maps smaller than 200 pixels on a side.

Facade: the map loads only on click. This is the lightest solution and the easiest to reconcile with consent:

<div class="carte-facade" data-src="https://www.google.com/maps/embed?pb=CODE_COPIED_FROM_GOOGLE_MAPS">
  <p>Optique Marceau, 12 rue des Tanneurs, 69002 Lyon</p>
  <button type="button">Show map (Google Maps)</button>
  <a href="https://www.google.com/maps/search/?api=1&amp;query=Optique+Marceau+12+rue+des+Tanneurs+69002+Lyon">Open in Google Maps</a>
</div>

<script>
  document.querySelectorAll('.carte-facade button').forEach((button) => {
    button.addEventListener('click', () => {
      const facade = button.closest('.carte-facade');
      const iframe = document.createElement('iframe');

      iframe.src = facade.dataset.src;
      iframe.title = 'Map: Optique Marceau, 12 rue des Tanneurs, Lyon 2nd arrondissement';
      iframe.width = '600';
      iframe.height = '450';
      iframe.style.cssText = 'border:0; width:100%; height:auto; aspect-ratio:4 / 3;';
      iframe.allowFullscreen = true;
      iframe.referrerPolicy = 'strict-origin-when-cross-origin';

      facade.replaceChildren(iframe);
    });
  });
</script>
.carte-facade {
  aspect-ratio: 4 / 3;
  display: grid;
  place-content: center;
  gap: 0.75rem;
  text-align: center;
  background: #eef1ec;
}

OpenStreetMap: on openstreetmap.org, open the “Share” panel, tick the option to include a marker, choose “HTML” and copy the code. Add title and loading="lazy" to the resulting iframe, and keep the attribution link it contains.

Leaflet, for a custom map or several locations:

<link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/leaflet.css">
<script src="https://unpkg.com/[email protected]/dist/leaflet.js"></script>

<div id="carte" style="aspect-ratio:4 / 3;" role="region" aria-label="Map of Optique Marceau stores"></div>

<script>
  const map = L.map('carte').setView([45.75812, 4.83241], 16);

  L.tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png', {
    maxZoom: 19,
    attribution: '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>',
  }).addTo(map);

  L.marker([45.75812, 4.83241]).addTo(map).bindPopup('Optique Marceau Lyon 2');
</script>

The tile.openstreetmap.org servers offer no service guarantee and may block heavy use; the usage policy requires visible attribution. For a high-traffic website, use a commercial tile provider or host your own tiles. In production, prefer installing Leaflet with npm or adding the integrity hash (integrity) provided on Leaflet's download page.

Warning: in the European Union, a Google map or a third-party tile service makes the visitor's browser connect to another server, and a Google map may set cookies. Check your choice against your consent policy: the facade, or loading after consent, avoids most difficulties. See handle applicable consent requirements (opens in a new tab).

WordPress

Versions WordPress 6.4 and later, tested on WordPress 7.1.

In the editor, add a “Custom HTML” block below the address and paste the iframe or the facade. Themes and page builders often offer a map block or widget: check that it adds loading="lazy" and a title, otherwise prefer the “Custom HTML” block. Some consent plugins can block Google Maps iframes until the visitor agrees; test it by rejecting cookies. Purge the cache after changes.

Shopify

Versions Shopify admin and Online Store 2.0 themes, all plans, November 2026.

Some themes offer a map section, which sometimes requires a Google Maps API key. Otherwise, in Online Store > Themes > Edit theme (formerly “Customize”), open the store page template, add a “Custom Liquid” section and paste the iframe or the facade. Place the section below the address.

Wix

Versions Wix Editor, all plans, November 2026.

Open the “Add Elements” panel, “Contact & Forms” category, choose a map element (“Maps” or “Full Width Maps”), then enter the address under “Manage Locations” (one or more addresses). In Wix Studio, the panels have different names; look for the Google Maps element in the add panel. Keep the address in a text element next to it: the map does not replace it.

Squarespace

Versions Squarespace 7.1, all plans, November 2026.

Add a Map block to the location page and enter the address, or paste the iframe into a Code block if your plan allows it. Place it below the text block that contains the address.

Webflow

Versions Webflow Designer, all plans (CMS collections from the CMS plan upward), November 2026.

Paste the iframe or the facade into a Code Embed element, placed below the address. Webflow also offers a Map element, which relies on Google Maps; see Webflow's help for the API key it requires.

Laravel

Versions Laravel 10 to 13.

The Maps Embed API key goes in config/services.php, read from .env:

// config/services.php
'google_maps' => [
    'embed_key' => env('GOOGLE_MAPS_EMBED_KEY'),
],

The resources/views/components/store-map.blade.php component:

@props(['store'])

@php
    $query = urlencode("{$store->name}, {$store->street}, {$store->postal_code} {$store->city}");
    $src = "https://www.google.com/maps/embed/v1/place?key=".config('services.google_maps.embed_key')."&q={$query}";
@endphp

<div class="carte-facade" data-src="{{ $src }}">
    <p>{{ $store->name }}, {{ $store->street }}, {{ $store->postal_code }} {{ $store->city }}</p>
    <button type="button">Show map (Google Maps)</button>
    <a href="https://www.google.com/maps/search/?api=1&amp;query={{ $query }}">Open in Google Maps</a>
</div>

Add the facade script once in the layout, and use <x-store-map :store="$store" /> in the location page. Restrict the key to your domain in the Google Cloud console: it is visible in the source code.

Next.js

Versions Next.js 15 and 16 (App Router).

A client component for the facade, in components/StoreMap.tsx:

'use client';

import { useState } from 'react';

export function StoreMap({ src, label, mapsUrl }: { src: string; label: string; mapsUrl: string }) {
  const [visible, setVisible] = useState(false);

  if (!visible) {
    return (
      <div style={{ aspectRatio: '4 / 3', display: 'grid', placeContent: 'center', gap: '0.75rem' }}>
        <button type="button" onClick={() => setVisible(true)}>
          Show map (Google Maps)
        </button>
        <a href={mapsUrl}>Open in Google Maps</a>
      </div>
    );
  }

  return (
    <iframe
      src={src}
      title={`Map: ${label}`}
      width={600}
      height={450}
      style={{ border: 0, width: '100%', height: 'auto', aspectRatio: '4 / 3' }}
      allowFullScreen
      loading="lazy"
      referrerPolicy="strict-origin-when-cross-origin"
    />
  );
}

The file uses JSX: name it StoreMap.tsx. The address is still rendered on the server in the page, outside this component.

Common mistakes

  • Map instead of the address: search engines, assistants and screen readers cannot read a map.
  • Map at the top of the page on mobile: it delays rendering and captures finger scrolling.
  • Iframe without dimensions: the page shifts when the map loads.
  • Map of the home address for a business whose address is hidden on its profile.
  • Unrestricted API key: any website can use it at your expense on the other Google Maps Platform APIs.
  • Multiple maps on a list page of fifty locations, each in its own iframe.
  • Hidden OpenStreetMap attribution or heavy use of the community tile servers.

Frequently asked questions

Does embedding a Google map improve local SEO?

No, Google documents no effect of embedding a Google map on local ranking. A business's location is described to search engines by the address as text, the LocalBusiness structured data and the Google Business Profile. The map serves visitors, who use it to place the business and start directions. Add one if it genuinely helps, making sure it does not slow the page down.

Do you need an API key to embed a Google map on a website?

No, not for a simple map. The embed code copied from Google Maps, through “Share” then “Embed a map”, works without a key. The Maps Embed API requires a Google Maps Platform project key, but Google says its usage is free and unlimited; among other things, it lets you designate the business by its place ID. Restrict any key to your domain.

How do you embed a map without slowing down the page?

To embed a map without slowing down the page, place it below the first screen, add loading="lazy" to the iframe and reserve its space with dimensions or an aspect-ratio. The lightest option is still a facade: a block with the address, a directions link and a button that loads the map only on click. Measure with PageSpeed Insights before and after adding it.

Updated on

Topic checklist (PDF)

And now?

In the “Local SEO” topic

  1. Create or claim a Google Business Profile if eligible
  2. Get the listing verified
  3. Choose primary and secondary categories
  4. Enter the real business name
  5. Enter the address or service area
  6. Enter the phone number
  7. Enter regular and special hours
  8. Add relevant services and products
  9. Write an accurate description
  10. Add authentic photos
  11. Add website and booking links
  12. Add UTM parameters
  13. Collect authentic reviews without selective gating
  14. Respond to reviews
  15. Standardize name, address and phone number (NAP)
  16. Create one page per actual location
  17. Display contact details, directions and parking
  18. Add a map if useful
  19. Implement LocalBusiness
  20. Set up Bing Places and Apple Business Connect
  21. Check local and industry directories
  22. Build local backlinks
  23. Publish content specific to the areas served
  24. Avoid artificially duplicated city pages
  25. Track geolocated rankings
  26. Test local AI recommendations