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

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. 
    Note: If possible, it's best to use a Google account set up specifically for your association (as opposed to your personal account). If the association does not have one, click Create Account.

  2. Once you are logged into the Google Cloud Platform, click the project name dropdown at the top of the page and choose the name of the project that you used when setting up your Maps API. 

    addreferrerproject.png

  3. Click the main menu icon on the top left corner and navigate to "APIs & Services" > "Credentials".

    addreferrermenu.png
  4. On the following page, click the pencil (edit) icon next to the API key to which you need to add a referrer.

    addreferrereditkey.png

  5. On the next screen, look under the "Application restrictions" header and make sure the radio button is selected for "HTTP referrers (web sites)".

  6. Below that is the list of current referrers ("Website restrictions"). You can enter or change the permitted websites and domains here. Mouse over existing entries to delete them or click the down arrow to expand and edit them.

  7. To add a new referrer, click "Add an item", enter the referrer URL and click Done. 
     
    IMPORTANT: Please enter domains using the '*' wildcard as shown in the examples below:
    *web.domain.org/*
    *.domain.org/*
    https://domain.org/* 


    addreferreradditem.png


  8. After all the needed referrers have been added, click SAVE at the bottom of the page.

 

Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Article is closed for comments.

Want some training on MC Trade? Sign up today for one of our upcoming training options.