Twitter LinkedIn

How to add a domain to your Google Maps API Referrer list

  • By 3chillies
3chillies
 
 

When you create a Google Maps API key, it can be locked to only be used on specific domains that you authorize. These domain names are called "referrers", and your API key won't work on other domains. If you add or change one of your domains, you may need to update your referrer list for that API key. 

  1. Visit the Google Cloud Console at https://console.cloud.google.com/ and log in with your Google Account. 

  2. Once you are logged into the Google Cloud Platform, find the main menu on the left side and locate where it says "APIs and Services"

  3. Mouse over that option and click on the "Credentials" sub-menu option. That should take you to a list of your API keys. 

  4. Click the pencil icon next to the API key you need to edit. 

  5. Scroll down to the header "Application restrictions" and make sure the radio button is selected for "HTTP referrers (web sites)" 

  6. Below that, it will say "Accept requests from these HTTP referrers" You can enter or change the permitted websites and domains here. Please enter like the below examples:

    *web.domain.org/*
    *.domain.org/*
    https://domain.org/* 
scroll back to the top of the current web page