Initial Setup

Protecting your Google Maps API key from unauthorized use - Setting up website restrictions (HTTP referrers)

3min
this article covers how to set up http referrers for your google maps api key to ensure your api key is not misused by an unauthorized party once you have set up your api key, please return to the google api manager https //console developers google com/apis/api/ please check that you have selected the api project that your api key was created against click credentials in the left hand menu in the dashboard select the three dots , in the action column next to your api key, and then select edit api key scroll to set an application restriction and select websites in the website restrictions section click on the add button, this will reveal an input box where you can add the domain/s you would like to lock your api key to in the add website input box please add your domain name in the following format (note there is no dot between the first asterisk and the domain), text example com/ and then select done if you maintain additional sub domains where the api key will also be used, an additional entry can be added in the following format (note in this instance, there is a dot between the first asterisk and the domain name example com/ and then select done once you have added your website restrictions scroll to the bottom of the page and select the save button