7 Methods to Embed Google Maps on Websites in 2023

  • Updated on: September 21, 2023

Released in 2005, Google Maps is a tool that streamlined mapping and navigation services. Furthermore, it made them accessible to nearly everyone. Moreover, many organizations embed maps from Google on their website due to its accessibility and usage.

Embedding a map on websites is now seen as a crucial element for many companies. Especially for companies that want to show their customers exactly where they are located.

Therefore, in this article, we will be outlining 7 methods through which you can add a map to your websites. As a result, you will be able to provide your customers with your exact location.

What is Google Maps?

Google Maps background with the Google Maps icon.

Google Maps is a web-based map provider. It enables users to view roads, routes, destinations, etc. of any place on earth on a simple and easy-to-understand map. And that’s just the basic feature of Google’s map service, it also offers:

  1. Navigation and Route Planning (Car, Walking, or Public Transport)
  2. Address or Location Marking
  3. Distance Measurement
  4. Satellite Imagery
  5. Real-Time Traffic Conditions
  6. Interactive Street View
  7. Terrain, Transit, and Biking Layers

As of 2021, Google’s mapping software was the most downloaded mapping app in the US. Moreover, using this map service before going out somewhere has become a staple habit for many people, including us. 

Uses of Google Maps

Google Maps background with the Google Maps icon.

The main draw of Google Maps is its GPS feature. The GPS can guide you to any destination in the world, from your point of origin, through accurate directions. 

Map services can be used by pretty much anyone who wants to go somewhere. Whether you are going shopping, or on vacation, Google’s online map is a very handy tool for planning out your journeys. This is because it can accurately guide you to any of these destinations.

Moreover, Google Maps provides the latest, up-to-date information on its map. Thus ensuring that users can reach their destination easily and without any backtracking.

For more information on how to use Google’s mapping service to the fullest, please see the below article “Ultimate Google Maps Guide For Beginners in 2022

Google Maps Business Listings

Google’s map tool has evolved to become something more than a simple navigation tool. Moreover, now people can use this service to discover and go to locations that were previously unknown to them.

Google’s Map service hosts a slew of extra features such as turn-by-turn directions, address search, traffic layout, etc. However, the most useful feature, especially for business owners, is the ability to add a business location on Google Maps.

If you compare Google’s mapping services now to when it first came out, the first thing you will notice is that currently it is populated by thousands of businesses such as cafés, bakeries, hotels, gas stations, etc. These locations are brought to the attention of people in two ways:

  1. When someone searches on Google
  2. If someone casually scrolls through the map and comes across your business location

Therefore, in today’s age, it is absolutely a no-brainer to not only register your company with Google Maps but also to optimize your business listing so that it appears in search results. Furthermore, you will want to add your business to online for two main reasons:

  1. It’s free
  2. Your business will gain more exposure to a wider audience (if it ranks high enough!)

Google Maps has become one of the best ways to raise awareness for your business. This is mainly due to its popularity. Furthermore, for a complete guide on how to market your business on Google, check out this Google Maps marketing article.

67% of people prefer using Google’s map services over any similar other navigation services. Therefore, if you are going to advertise your business, you might as well do it on the most popular platform that is visited by millions of people.

If you have a business listed with Google Maps, then consider embedding it’s map on your website. This will allow customers to view your location on the map directly from your website.

In the upcoming section, we will be discussing exactly how you can add a map to your website. Furthermore, we will see what benefits you can get by embedding a map on your website.

Benefits of Embedding Google Maps on Your Websites

Google Maps background with a tablet showing a website.

1- Helps People Find Your Business

The first benefit of embedding Google Maps on your website is that more people will be able to easily find your place of business from your website.

Since Google’s map is a navigation tool, it makes sense to advertise your business on a platform that shows people where you are located and gives directions to users on how to reach your place of business.

A lot of people may not know where your business may be located. Therefore, if you don’t provide a means for people to contact or reach your place of business, you risk losing this customer to one of your competitors.

As we mentioned before, Google Maps’ popularity ensures that your business has a chance to get noticed by many users. Therefore, it is critical, for business owners, to not only create a Google Maps business listing with as much information as possible but also to insert Google’s map on their website so that their visitors or customers can determine their location directly from their website.

Most search results consist of local businesses. Therefore, if you want to tap into the local customer base, which is arguably where most of your customers lie, you will need to make sure you have your business registered with Google Maps. In addition, embedding it on your website is an extra step you can take to provide potential customers with your exact location when they are browsing your website.

2- Enables People To Get Your Contact Information

Embedding Google Maps on your website is one of the best and easiest ways for people to get access to your contact information such as phone number, email, etc. which customers use to get in touch with you.

A customer who comes across your business profile, on your website, will be able to get a complete summary of your business, and this includes your email, phone number, address, etc. Furthermore, having this information easily available and on hand removes any barriers for customers to contact and visit you.

A person is more likely to make a call or send an email if they have everything they need in front of them. On the flip side, you can be sure a person will abandon reaching out to you if they have to sift through dozens of places just to get your contact number.

3- Allows People to Reach Your Place of Business

Since Google Maps is a navigation tool, it can also help potential customers reach your location to do business with you.

Embedding a map on your website, with your business locations marked, will allow users to see your location on the map directly from your website. In addition, users can get turn-by-turn directions from their current location to your business location.

An alternative way to enable people to reach your business location quickly and easily is by installing a dedicated store locator, such as Agile Store Locator, on your website. Store locators help your customers get to your physical location by providing them with accurate and up-to-date information, such as an address, directions, store timings, etc

4- Prevents Customers from Leaving Your Website

Arguably, the most important benefit of embedding Google Maps on your website is that it prevents customers from leaving your website. Not permanently, of course.

Now you may be asking, “What does it mean that embedding a map prevents my customer from leaving my website?”

Well, let us clarify.

By embedding Google Maps on your website, your customers will not have to open Google’s map on a separate tab to determine where your location is, they can do it directly from your website. However, if you don’t incorporate a map on your website, then your visitors may need to open a separate tab to determine your exact location, and this can work against you because the moment a visitor leaves your website, there is no guarantee that he/she will come back because they might get distracted by something else. For example, once your visitors open a chart outside your website, they will be bombarded with other businesses, locations, and attractions, and as a result, they might forget about your website entirely.

By embedding Google’s mapping tool on your website, you will ensure that your customers have everything they need to reach your location WITHOUT needing to leave your website. Furthermore, this ensures your visitors/potential customers spend more time on your website. Moreover, the more time your visitors remain on your website, the more chances you have that they will get more information about your products, services, and organization, which may eventually lead them to perform a favorable action such as:

  1. Creating an account on your website
  2. Filling out a survey
  3. Leaving a review 
  4. Rating a product or service
  5. Purchasing a product

5- Offers a Better Experience for Your Customers

Embedding Google Maps on your website gives your organization or company credibility because it shows your potential customers that you have registered your business with a well-known brand that only registers valid businesses that have proven their authenticity.

By embedding Google Maps on your website, you will send signals to your visitors that your company or organization is authentic and not a fake place.

Moreover, after embedding the map on your website, the overall experience of your website’s visitors will also improve because of the following reasons:

  1. They have an easy method of finding your location
  2. Your authenticity will be validated
  3. Your website will be on par with other websites that incorporate maps

How to Embed Google Maps on Your Website

Google Maps background with a laptop showing..

It is very easy for users to add maps to their websites using HTML, CSS, and JavaScript, and these methods will be discussed in detail shortly. Moreover, there are also third-party applications, such as store locators, which instantly insert a map onto your website. 

These are the two main ways (which can be divided into further sections) through which Google’s map can be embedded in your website.

So let’s go over 7 methods or ways through which you can insert Google’s map on your website.

Embedding Google Maps through Third-Party Applications

1- Store Locator Plugins

If you are a business owner who has one or more physical locations that potential customers can visit, then one of the easiest ways to put a map on your website is by using a store locator plugin.

A store locator plugin enables you to embed a Google map on your website without the need to deal with any complicated codes. Furthermore, many store locator plugins, such as Agile Store Locator, enable their users to add Google’s map service with a simple shortcode.

Using a store locator plugin to add a map will also give you an extra benefit, which is that you will be able to create a store locator page on your website. The store locator page will have the embedded Google Maps as well as a list of stores/locations which users can use to easily select a particular location, and get information about each location (timings, store category, address, etc.). Furthermore, the store locator map even opens a small window when the mouse cursor is placed over any of your locations, these windows provide a small summary about your business/location (what they are, where they are, what they sell, etc.)

Benefits of a Store Locator Page

With a store locator page installed on your website, you will be able to provide customers with accurate information regarding your stores such as location, address, direction, store timing, contact information, social media links, etc. As a result, your potential customers will have everything they need to quickly and easily get to your store without any frustration.

Moreover, when a potential customer reaches his/her destination without any hassle, they might be more likely to buy something because they won’t be in a bad mood from getting lost and backtracking trying to find your location. That’s why a store locator is so useful for business owners because it allows you to guide customers to your store so that when they reach their destination, they will most likely be in a “buying” mood.

However, you will have to apply for a Google API key to allow certain store locator plugins to put a map on your website. For example, Agile Store Locator demonstrates how to get a Google API key in the following article: How to Enable Google Maps API for Agile Store Locator Plugin.

2- Product Locator Plugins

Similar to the first method, another type of plugin that can add maps to your website are product locator.

As with store locator plugins, most product locator plugins require a Google Maps API key to be able to embed a map on your website. Furthermore, the embedded Google Maps will be shown on the product locator page which the product locator creates.

Product locators, such as WP Maps, function similarly to store locators in that they add online maps to your website and show the location of all your stores on the embedded Map. 

However, the additional feature of product locators is that they can also show what products you have available in which store. For example, you can configure a product locator to show that you are selling carpets in-store “B” and store “C”, now whenever a potential customer wants to buy carpets they will know which stores to go to and which to avoid (if you have multiple stores).

Product locators are an overall excellent way to insert maps on your website for the following reasons:

  1. It’s simple and quick
  2. You get store locator features
  3. And you get product locator features

So essentially you are getting 3 services for the price of one. 

3- WordPress Plugins

Besides store locators and product locators, you might find a dedicated plugin on WordPress whose sole purpose is to add maps to your website and customize it, nothing more and nothing less.

The way to add Google Maps through WordPress plugins or extensions usually involves the following steps:

  1. Install the plugin
  2. Generate a Google Maps API key
  3. Use the plugin to create a map
  4. Link the API key to the map
  5. Customize the map with your locations
  6. Use a generated shortcode to add the map to your website

Embedding Google Maps Through Codes

The next 4 methods of embedding Google Maps involve working with and manipulating a few lines of code. Therefore, it is recommended that only people with sufficient knowledge of coding use these 4 methods.

For non-technical people, with little to no knowledge of coding, it may be better to use the 3 methods mentioned in the previous section to add a map on their website.

1- Simple Iframe Code

The simplest way to incorporate a map into your website is by using an iframe code. Iframe codes are provided by Google’s mapping software when you decide to embed a map with a certain location.

This way of embedding Google Maps on your website is quick and simple. Furthermore, the height and width of the embedded map can be adjusted by changing the “height” and “width” attributes in the HTML code. However, by using such a simple method to add a map to your website, you will only get a static map that does not resize automatically on various devices.

Please follow the below steps to embed Google Maps on your website using iframe codes:

  1. Go to Google’s map
  2. Select a location
  3. Click on the “Share” button
  4. Select the “Embed a map” tab
  5. Choose a map size and click on “Copy HTML”
  6. Paste the HTML code onto your webpage HTML editor

The HTML code will look something like this:

<iframe src="https://www.google.com/maps/embed" width="600" height="450" style="border:0;" allowfullscreen="" loading="lazy" referrerpolicy="no-referrer-when-downgrade"></iframe>

Once you paste this code into your website’s HTML editor, it will insert a map into your website.

2- Embed Without API and Make a Responsive Google Maps

Let’s now talk about a method of embedding Google Maps that utilizes iframe code (as mentioned in method 1), but you can take it a step further by using CSS to make a responsive map.

Here is what you need to do:

  1. Follow the steps mentioned in Method 1
  2. Modify the HTML code with a CSS class called map-responsive around the iframe code, as shown below:
<div class="map-responsive">
<iframe src="https://www.google.com/maps/embed" width="600" height="450" frameborder="0" style="border:0" allowfullscreen></iframe>
  1. Add the below Google Maps CSS code:

.map-responsive iframe{

By using CSS, you will have created a responsive map without the need for an API key. This type of Embed can work on a majority of HTML websites.

3- Embed a Responsive Google Maps without API and CSS

The previous method creates a responsive Google Maps embed using a few lines of additional code. However, many people may not be comfortable using CSS. Therefore, this method will show you how to create a responsive Google Maps embed without using an API key and without using CSS.

This method is one of the easiest methods to add a map using codes. All you need to do is follow the below steps.

  1. Obtain the Google Maps iframe code (as mentioned in method 1)
  2. Paste the code into your website’s HTML editor
  3. Next, change the “Height” and “Width” values in the iframe code to 100%

As a result, the map embed will take up the whole space of the HTML container widget, and therefore, it will be responsive and capable of re-adjusting on any device.

The best part is that you will not need to make any additional CSS styling changes if you opt to use this method to embed Google Maps on our website. In addition, you do not need to get a Google API key as well.

4- Embed using JavaScript (using API)

This is the most complex method to add a map to your website because it requires knowledge of HTML, CSS, and JavaScript. Therefore, people who are not familiar with coding should use other methods mentioned in this article.

If you believe you can manage this method, then here is what you need to know.

Firstly, for this method, you will need to generate a Google Maps API key, which can be obtained from the following steps.

  1. Go to the Google Cloud Platform and create a new project 
  2. Go to “APIs and Services” and select “Credentials”
  3. On the top, click on the “Create Credentials” button and select “API Key”
  4. Copy the API key from the “API key created” window

Be sure to restrict the newly generated API key to your website before moving on.

Next, you will need to add the following elements to your page editor:

Map Styling Code
 #map {
    width: 100%;
    height: 400px;
    background-color: grey;
The Map Script that Defines the Map Element
    function initMap() {
      var macc = {lat: 42.1382114, lng: -71.5212585};
      var map = new google.maps.Map(document.getElementById('map'), {zoom: 15, center: macc});
      var marker = new google.maps.Marker({position: macc, map: map});
The Google Maps API script
<script async defer src="https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY&callback=initMap"></script>

By adding these elements to your page editor, you will successfully create a responsive Google Maps embed using Google Maps JavaScript API.

The word "Conclusion"


Embedding Google Maps on your website can be a very beneficial business decision that can do the following:

  1. Raise the credibility of your brand
  2. Help more people reach your physical location
  3. Keep potential customers on your website for longer periods

With there being many ways, technical and non-technical, to insert Google Maps on your website, there is sure to be a method outlined in this article that will help you achieve this.