Webloped blog · 15 min read
How to add Google Maps to your website
A map on your contact page answers the first question every local visitor asks: where exactly are you, and how do I get there? Here is the free five-minute embed, a Get Directions button, the steps for WordPress, Wix, Squarespace and Shopify, and the one case where you actually need an API key.
The short answer: open Google Maps, search for your business, click Share, then Embed a map, and paste the code Google gives you into your website. It costs nothing, takes about five minutes, and works on every major platform. A Get Directions link next to the map is the second thing worth adding, because it opens turn-by-turn directions on your visitor's phone in one tap. You only need an API key and a Google Cloud billing account if you want a custom interactive map, such as one with multiple locations, custom pins, or a search box built into the page.
Before you start, one thing needs to be true: your business needs to exist on Google Maps with the right address. If you have not claimed your listing yet, start with our guide on how to get your business on Google. The embed pulls its pin, name, and address straight from your Google Business Profile, so a wrong or unclaimed listing means a wrong map on your site. If you already have a profile, check the pin position on Google Maps before you embed anything - a pin dropped on the wrong side of the street sends customers to the wrong door, and in a plaza or a rural address it can be off by a whole block.
Why a map belongs on your website
For a local business, the map does three jobs at once. First, it proves you are real. A street address on a live map is much harder to fake than a line of text, and visitors notice the difference even if they cannot explain why. Second, it removes the last bit of friction before a visit. Someone deciding whether to drive to your shop, clinic, or studio does not want to copy your address into another app - they want to see where you are relative to where they are, and tap once for directions. Third, it supports your local search visibility. A map on your contact page, with your address written out in plain text next to it, reinforces the same name, address, and phone number that Google uses to decide which businesses to show for "near me" searches. Our guide on how to do local SEO for your small business explains how that consistency works across your whole site.
The map is also the fastest way to answer the questions your phone gets asked all day: where are you, is there parking nearby, and which entrance do I use? A visitor who can see the map, the parking lot, and the street view can answer those questions themselves, which means fewer calls and fewer people showing up at the wrong entrance.
Method 1: the free Google Maps embed
This is the method almost every small business should use. It is free, it needs no account, no API key, and no code beyond pasting one snippet. The map shows your business on a live Google map with your star rating and review count, and visitors can zoom, pan, and click through to Google Maps for directions.
How to do it:
- Open Google Maps in your browser and search for your business name or address.
- Check that Google has selected the correct place. If two businesses share a similar name, or your building has several units, the wrong pin is the most common mistake at this step.
- Click Share, then choose the Embed a map tab.
- Pick a size. Small, medium, and large presets are offered, or choose a custom size that fits your page layout. A map that is wider than it is tall usually works best on a contact page.
- Click Copy HTML and paste the code into your website where you want the map to appear.
The code Google gives you is an iframe, a small window that loads Google Maps inside your page. You do not need to understand how it works, and you should not try to rewrite it by hand - the copied code already contains the right location and settings. If you ever move premises, repeat the same steps with the new address and replace the old embed.
Good for: any single-location business that wants a live map on its contact page for free, with zero maintenance. The map updates itself, because it is served live by Google. Not good for: showing several locations on one map, styling the map to match your brand colours, or letting visitors search for an address inside your page. Those need the API methods below.
Method 2: a Get Directions button or link
The embed shows people where you are. A directions link gets them there. On a phone, a Get Directions link opens the Google Maps app with your address already filled in as the destination, which is exactly what a visitor standing in a parking lot or sitting in a car needs.
Google has an official link format for this. Build the link by taking your address and putting it into this pattern, with plus signs or percent-encoding in place of spaces:
https://www.google.com/maps/dir/?api=1&destination=YOUR+ADDRESS+HERE
For example, a business at 123 Main Street in Cambridge, Ontario would use https://www.google.com/maps/dir/?api=1&destination=123+Main+Street,+Cambridge,+ON. You can also add a travel mode, such as &travelmode=driving, walking, bicycling, or transit. Add the link to your site as a button that says "Get Directions" and place it right next to the map, in your footer, and on your contact page. The link is completely free, needs no account, and works on desktop and mobile.
One practical tip: test the link on your own phone before you publish it. Open it, confirm it lands on your business and not a similarly named one across town, and check that the route it suggests makes sense. In new subdivisions and rural areas, Google's address data can lag behind the real world, and a link that points at an empty field is worse than no link at all.
Method 3: adding the map on your platform
The embed code is the same everywhere. What changes is where you paste it. Here are the steps for the platforms most Canadian small businesses use.
WordPress. In the block editor, add a Custom HTML block where you want the map, paste the iframe, and use Preview to check it before you publish. In the classic editor, switch from the Visual tab to the Text tab and paste the code there. If the map disappears after you save, your user account may not have the permission WordPress requires to save iframes - ask your site administrator, or have the map added by someone with that permission. Page builders such as Elementor and Divi have their own HTML or Code modules, and most also ship a Google Maps widget, though the widget usually gives you less control over zoom and map type than the raw embed.
Wix. In the editor, click Add Elements, then Embed Code, then Embed HTML. Paste the iframe, resize the box to fit your layout, and publish. Wix also offers its own map element, but the Google embed shows your live rating and review count, which the built-in element may not.
Squarespace. Edit the page, add a Code block, paste the iframe, and save. Squarespace also has a dedicated Map block, which is simpler but shows a generic map rather than your business listing with its rating. If the rating matters to you, use the Code block with the Google embed.
Shopify. For a page, open Online Store, then Pages, edit the page, click the Show HTML button in the editor toolbar, paste the iframe, and save. For a section that appears on several pages, go to Online Store, then Themes, then Customize, add a Custom Liquid section, and paste the code there. This is the right spot for a map in a store footer or on a locations page.
Plain HTML site. Paste the iframe directly into the page file where the map should appear, inside the body of the page. Wrap it in a container so you can control its width with CSS, and test the page in a browser before you upload it.
Where to put the map. The contact page is the obvious home, and it is where most visitors look for it. Also consider the homepage footer if your address matters to most of your customers, a locations page if you have more than one site, and any service page where a visitor needs to come to you, such as a clinic booking page or a showroom page. Do not put a map on every page of your site - a map in the footer of a blog post adds load time and nothing else.
Method 4: the Maps Embed API and the JavaScript API
If the free iframe is not enough, Google offers two more ways in, and it is worth knowing which one fits your situation before you pay a developer to build something.
The Maps Embed API is the iframe's more flexible cousin. It uses a similar iframe, but the URL is built from parameters you control, which gives you five modes: place, view, directions, street view, and search. This is the right choice if you want a repeatable template, for example the same map layout on ten location pages, or a Street View embed of your storefront. It needs a Google Cloud project, the Maps Embed API enabled, and an API key. Google lists the Maps Embed API as available at no charge with unlimited requests, but you still need a billing account attached to the project. If you use this method, restrict the API key to your own website in the Google Cloud console, because anyone can read the key from your page source.
The Maps JavaScript API is the full developer option. It lets you build a custom interactive map: multiple pins, custom markers, a search box, directions drawn on the page, and styling that matches your brand. It also needs a Google Cloud project, a billing account, and an API key, and usage is billed after a free monthly allowance that covers most small business sites. Use it only if you need a feature no simpler method provides. For a single location on a contact page, it is overkill, and the free embed from method 1 will look and behave the same to your visitors at no cost and no maintenance.
Make the map work well on phones and for everyone
Most of your visitors will see the map on a phone, so the details matter more than they seem. A map that is too small to tap, or one that hijacks the page scroll, is a common reason visitors give up and call instead.
- Make it responsive. Put the iframe inside a container that is full width on mobile, with a fixed height of around 350 to 450 pixels. A fixed-width embed from Google will overflow a phone screen, so do not use the pixel width Google suggests without adjusting it for your layout.
- Write your address out in text next to the map. Search engines cannot read the address inside the map image, and visitors on a slow connection or with images blocked cannot read it either. A plain-text address, phone number, and hours beside the map help both. This also keeps your name, address, and phone number consistent with your Google Business Profile, which matters for local search. See our guide on how to rank higher on Google Maps for the rest of that checklist.
- Give the iframe a title. Screen readers announce iframes by their title, so add something like
title="Map showing the location of Your Business Name". Without it, a visitor using a screen reader hears a meaningless frame with no context. - Load it lazily. Add
loading="lazy"to the iframe so the map only loads when a visitor scrolls near it. A map is a heavy piece of content, and loading it lazily keeps your page fast for visitors who never scroll that far. If your page speed drops after adding a map, our guide on how to make your website load faster walks through the other fixes worth checking. - Do not use a screenshot of a map instead of a live one. A static image looks similar, but it cannot zoom, cannot give directions, and goes stale the moment your rating changes or Google updates the area. If a live embed is genuinely impossible on your platform, a screenshot plus a Get Directions link is an acceptable fallback, but it is a fallback, not a plan.
- Match the language of your visitors. If you serve customers in Quebec, or anywhere with a French-speaking audience, remember that your site and its key information may need a French version. Our guide on whether your website needs to be in French in Canada explains when that applies. The map itself follows the visitor's language settings, but your address text, hours, and directions button are yours to translate.
Common mistakes to avoid
Embedding the wrong location. The most common error, and the most expensive one, because it sends real customers to the wrong place. Always verify the pin on Google Maps before you copy the embed code, and test the Get Directions link on a phone.
A map with no text address. The map alone does not help search engines, screen readers, or visitors on a slow connection. Always pair it with your address in plain text.
A tiny map. A 300-pixel-wide map on a desktop contact page looks like an afterthought and is hard to use. Give it room, at least half the width of the page, and a height visitors can actually read.
Maps on every page. A map in a site-wide footer loads on every page, including blog posts where nobody needs it, and slows the whole site down. Keep the map on the pages where location matters.
Forgetting to update the map when you move. If your business relocates, the map, the text address, your Google Business Profile, and your footer all need to change together. A map that shows your old address after a move is worse than no map, because visitors will trust it.
Paying for a custom map you do not need. If a developer quotes you for a Maps JavaScript API integration for a single location, ask what it does that the free embed does not. For most small businesses, the answer is nothing your visitors will notice.
How Webloped works
We are a web design and AI automation company based in Cambridge, Ontario. We build websites for Canadian small businesses that are set up to bring in local customers - contact pages with a live map and directions, Google Business Profiles that match the site, and local SEO that puts the business in front of people searching nearby. When you ask us for a price, you get a fixed quote in CAD before any work starts - the number we agree on is the number you pay. Our pricing page explains how projects and care plans are structured, or send us a message (or email contact@webloped.ca) and we will take it from there.
Frequently asked questions
Is it free to add Google Maps to my website?
Yes, for the method most small businesses use. The basic embed you get from Share, then Embed a map in Google Maps is free, with no account, API key, or billing setup. A Get Directions link is also free. You only pay when you use the Maps JavaScript API beyond its free monthly allowance, which most small business sites never reach, or when you hire a developer to build a custom map.
Do I need an API key to add Google Maps to my website?
No, not for the basic embed. The iframe Google gives you from the Share menu works without any key. You need an API key only if you use the Maps Embed API or the Maps JavaScript API, which are the options for repeatable templates, Street View embeds, multiple locations, or custom interactive maps. If a tutorial tells you to create a Google Cloud project before you have even added a map, it is solving a problem you do not have yet.
Will adding Google Maps slow down my website?
It can, because a live map loads scripts and images from Google. The effect is small if you do two things: add loading="lazy" to the iframe so it only loads when a visitor scrolls near it, and keep the map on the pages where location matters instead of in a site-wide footer. Test your page speed after adding the map, and if it drops noticeably, check our guide on how to make your website load faster for the other fixes worth trying.
Can I add Google Maps with multiple locations to my website?
Yes, but not with the basic embed, which shows one place at a time. For two or three locations, the simplest approach is one embed per location on a locations page, each with its own text address and Get Directions link. For more locations, or a single map with all your pins on it, you need the Maps JavaScript API, which a developer can build for you. Before you invest in that, check that each location has its own verified Google Business Profile - a multi-location map is only as good as the listings behind it.