Meregate.com
Saturday, November 28, 2026
Home โ€บ Computers โ€บ How to Add Google Maps to Your Website: A Simple Guide (2026)

How to Add Google Maps to Your Website: A Simple Guide (2026)

How to Add Google Maps to Your Website: A Simple Guide (2026)

Learning how to add Google Maps to your website takes about five minutes, and you do not need to write any code. A map on your contact page helps visitors find your shop, office, or event in one click, and it makes a small business look more real and trustworthy. This guide shows you the free no-code method first, then the WordPress, Wix, and Squarespace steps, and finally the API route if you want a custom map.

Last updated: November 2026

Why Add Google Maps to Your Website?

Most visitors check a map before they visit a place in person. A map on your site does four useful things:

  • Directions in one click. Visitors tap the map and get turn-by-turn directions in the Google Maps app. They never have to copy and paste your address.
  • Trust. A real, pinned location tells people your business is a real place, not just a web page.
  • Fewer questions. “Where are you?” and “How do I get there?” stop landing in your inbox.
  • Local search help. A map that matches the address on your Google Business Profile keeps your business details consistent across the web, which helps local search.

You do not need a Google Business Profile to add a map, but if you have one, use the exact same address everywhere. A mismatch between your site and your profile confuses both visitors and Google.

Before You Start: What You Need

For the simple method, you need only two things: the address you want to show, and a web page you can edit. No Google account is needed to copy an embed code, and no API key is needed for the basic map. If you want a custom map with your own markers, colours, or search box, you will need a free Google account and a Google Cloud project, which we cover in Method 4.

One warning up front: check that Google has the right place before you copy anything. Two businesses can share a similar name, and Google sometimes picks the wrong one. If the pin sits on the wrong building, fix it in Google Maps first by suggesting an edit on the place, or search by your exact street address instead of your business name.

Method 1: The Free No-Code Embed (Works on Any Website)

This is the method most small businesses should use. It takes about two minutes and works on any site that lets you paste HTML, including WordPress, Wix, Squarespace, Shopify, and plain HTML pages.

  1. Open Google Maps on your computer and search for your business name or street address.
  2. Check the pin. Make sure it sits on the right building and the address in the side panel is correct.
  3. Click Share, then choose Embed a map.
  4. Pick a size: small, medium, large, or custom. You can change the size later, so do not worry about getting it perfect.
  5. Click Copy HTML.
  6. Paste the code into your web page where you want the map to appear, then save and publish.
  7. Open the live page on your phone and your computer, and check the map loads and the pin is right.

The code Google gives you is an <iframe> โ€” a small window that shows Google Maps inside your page. Your site does not copy Google’s map data. Visitors see the live map, and they can zoom, switch to satellite view, and click through to directions.

Google notes that embedded maps do not work well below 200 by 200 pixels, so keep your map at least that large. A map around 600 pixels wide and 450 pixels tall works well on most pages.

Google My Maps screen showing a custom map with markers
Source: Wikimedia Commons

Method 2: Add Google Maps to WordPress

WordPress gives you two easy routes. Pick the one that matches how your site is built.

Using a Custom HTML block (no plugin)

  1. Copy the embed code from Google Maps, as in Method 1.
  2. In the WordPress editor, add a Custom HTML block where you want the map.
  3. Paste the code, then click Preview to check it looks right.
  4. Publish or update the page.

Using a plugin

If you add maps to several pages, or you want extra features like multiple markers, a plugin saves time. Search the plugin directory for “Google Maps” and pick one with recent updates and good reviews. Most free map plugins let you add a map with a shortcode or a block, and you type in the address instead of pasting code. Skip any plugin that has not been updated in over a year.

Method 3: Add Google Maps to Wix or Squarespace

Both builders have a map element built in, so you do not need to touch any code.

Wix

  1. Open the page in the Wix editor and click Add Elements.
  2. Choose Map and pick the Google Maps element.
  3. Type your address in the settings panel and drag the map where you want it.
  4. Publish the site and test the map on your phone.

Squarespace

  1. Open the page editor and click Add Block.
  2. Choose the Map block.
  3. Type your address. Squarespace fills in the map from Google Maps.
  4. Save the page and check the live version.

On both builders, the map block is the basic Google map. If you want a custom style or several marked locations, use the embed code from Method 1 in a code block instead.

Method 4: The API Route for Custom Maps

The simple embed covers one place. If you want more โ€” your own markers, a search box, directions between two points, Street View, or a map that matches your brand colours โ€” you need the Google Maps Platform API. This route takes more setup, so use it only if the basic embed cannot do what you need.

What you need first

  • A Google account and a Google Cloud project.
  • Billing turned on for that project. Google currently lists Maps Embed API requests at no charge with unlimited usage, but a billing account is still required to create the key.
  • The Maps Embed API (or Maps JavaScript API) turned on in your Cloud project.
  • An API key, restricted to your website’s address so nobody else can use it.

Google’s own Maps Embed API guide walks through the setup step by step, and it is the page to follow rather than a random tutorial, because the steps change over time.

The five Embed API modes

The Embed API supports five modes: place (one location), view (a map centred on a point), directions (a route), streetview, and search (results for a query like “coffee near me”). Each one is a single iframe with your key in the address. For example, a place map looks like this, with your own key in place of the placeholder:

Diagram showing how a Google Maps web address is structured
Source: Wikimedia Commons
<iframe
  src="https://www.google.com/maps/embed/v1/place?key=YOUR_API_KEY&q=Space+Needle,Seattle+WA"
  width="600" height="450" style="border:0;"
  loading="lazy" allowfullscreen>
</iframe>

Keep your API key safe

Anyone who views your page source can see a key that sits in an iframe address. That is normal for this kind of map, but it means you should restrict the key in Google Cloud to your own website’s address and to the Maps APIs you actually use. Check the key’s usage in Cloud Console now and then. An unrestricted key can be copied and used by someone else.

For full control โ€” custom markers, info windows, filters, and data from your own database โ€” use the Maps JavaScript API instead. Google’s current docs recommend its declarative map web component for new projects, but the classic JavaScript setup still works. This is developer work. If you are not comfortable with JavaScript, hire a developer for this part rather than guessing.

Make Your Map Responsive (So It Works on Phones)

The embed code Google gives you has a fixed width, so on a phone it can overflow the screen or look squeezed. Wrap the iframe in a container and let CSS handle the size:

<div class="map-wrap">
  <iframe src="..." width="600" height="450" style="border:0;"
    loading="lazy" allowfullscreen></iframe>
</div>

<style>
.map-wrap { width: 100%; max-width: 900px; }
.map-wrap iframe { width: 100%; aspect-ratio: 16 / 9; border: 0; }
</style>

On WordPress, you can add this CSS in the Customizer under Additional CSS. On Wix and Squarespace, the built-in map blocks already resize themselves, so you can skip this step.

Make the Map Load Fast and Respect Privacy

A map is a heavy piece of a page. Two small habits keep it from slowing your site down:

  • Lazy-load it. Add loading="lazy" to the iframe, as in the examples above. The map then loads only when a visitor scrolls near it, so it does not slow down the first view of your page.
  • Put it low on the page. A map belongs on a contact page, near the address and opening hours โ€” not at the top of your home page.

On privacy: a Google map loads content from Google’s servers and can set cookies, which matters if your visitors are in the EU or the UK. If you show a cookie banner, make sure it covers third-party embeds like maps. Some sites show a static map image first and load the live map only after the visitor clicks it. That is a good middle ground if you want both speed and privacy.

Common Problems and Fixes

The map shows a grey box

This is usually a size problem. The map’s container has a height of zero, often because of a theme conflict. Give the iframe a fixed height, like 450 pixels, and check again. If you use the API route, a grey box can also mean the API key is wrong or the API is not turned on.

The pin is on the wrong place

Go back to Google Maps and search by your exact street address, not your business name. Copy a fresh embed code. If Google itself has your address wrong, suggest an edit on the place in Google Maps.

“This page can’t load Google Maps correctly” or an API error

This message means the API key has a problem: it is missing, restricted to the wrong website, or the billing account is not attached. Open Google Cloud Console, check the key’s restrictions and the project’s billing, and check that the Maps Embed API or JavaScript API is enabled.

The map is too small on mobile

Use the responsive wrapper from the section above. Also check that your theme is not forcing a fixed width on iframes.

The map slows the page down

Add loading="lazy" and move the map lower on the page. If the page still feels slow, replace the live map with a static image that links to Google Maps, and let visitors click through to the live map.

Should You Use Google Maps or Another Map?

For most small businesses, Google Maps is the right choice because your customers already use it and already trust its directions. Two alternatives are worth knowing about. OpenStreetMap, with the free Leaflet library, costs nothing and needs no API key, but you host the map yourself and it takes more setup. Mapbox gives you beautiful custom map styles and a generous free tier, but it is built for developers. Unless you need a custom-styled map or you want to avoid Google, the basic Google Maps embed is the simplest answer.

Frequently Asked Questions

Do I need an API key to add Google Maps to my website?

No. The basic embed from the Share menu needs no key and no Google account. You only need an API key if you use the Maps Embed API or the JavaScript API for custom features.

Is it free to add Google Maps to a website?

Yes, the basic embed is free. The API route needs a Google Cloud billing account, but Google currently lists Maps Embed API requests at no charge with unlimited usage.

Can I add Google Maps to my website without coding?

Yes. Copy the embed code from Google Maps and paste it into a Custom HTML block in WordPress, a code block in Squarespace, or an embed element in Wix. The builders also have built-in map blocks that need no code at all.

How do I add a map with directions to my business?

In Google Maps, get directions to your address first, then click Share and Embed a map. The embedded map keeps the route. With the Embed API, use the directions mode with your start point and destination.

Will a Google Map slow down my website?

It can, because it loads scripts from Google. Add loading=”lazy” to the iframe and place the map lower on the page, near your contact details. That keeps your first page load fast.

Can I show more than one location on a map?

Yes, but not with the basic embed. Use Google My Maps to build a map with several pins, then share it, or use the Maps JavaScript API for a fully custom multi-location map.

The Bottom Line

For most websites, the free embed is all you need: find your place in Google Maps, click Share, then Embed a map, copy the HTML, and paste it into your page. Add lazy loading and a responsive wrapper so it works well on phones, and check the pin is on the right building. Only move to the API route when you need custom markers, directions, or a styled map โ€” and when you do, restrict your API key to your own site. A correct, fast-loading map is a small detail, but it is often the last step between a visitor and a customer walking through your door.

Taylor Orlando

Taylor Orlando is a content writer at Meregate covering websites, SEO, and AI. Taylor breaks down complex topics into simple, practical guides that help small businesses build better websites, rank higher on Google, and get real value from AI tools โ€” no jargon, no fluff.

Related Articles