Restricting your Google Maps API key
Restricting your Google Maps API key will help to keep your account secure. Similar to ensuring your house keys or car keys are kept safe, securing your API key is important so it can only be used by those you intend to it and not other people who may misuse or abuse it. This guide outlines the steps you will need to take in order to restrict your API key. By default there are no restrictions setup on your account, but these restrictions can be changed at anytime once you’ve setup your account.
In addition, you might find that your website maps are not working even if there are up to date billing details added to your account. This can be caused by a lack of restrictions on your API key so it’s important you take these additional steps on your account.
Log into your Google Cloud Console account.
https://console.cloud.google.com/google/maps-apis/credentials? this may be the same account used for your Google Analytics account
From Google Console’s Maps area use the Navigation panel and go to ‘Keys and Credentials’ - https://console.cloud.google.com/google/maps-apis/credentials?
On the credentials page under ‘Actions’ you will see 3 dots. Click on the dots and click on ‘Edit API Key’
Under the ‘Set an application restriction’ check the ‘Websites’ option from the list
A new ‘Website restriction’ section will pop up underneath
Using the ‘Add’ button you will need to add all the domain names that will be using the key
www.domainname.com
commercial.domainname.com
Once you have added all the links, save the changes. Refresh your website to check if the map has started to work. If you are still experiencing issues, please contact the helpdesk for further assistance.
Keywords: Google Maps, API Key, Map Functionality, Restrict API Key, Google Maps Restriction, Google maps not working, Google maps error, map error, map not working