Ensuring Your Referrers are Properly Inserted

 

This article covers ensuring your referrers are properly inserted in your Google Maps API project. This documentation is current for WP Google Maps version 6 and the Google API Manager interface as of December 2017.

 

Incorrectly inserting your referrers in your Google Map API project can result in your Map not being properly displayed. You’ll find an error message from the Google Maps API (RefererNotAllowedMapError) in the JavaScript console of your website.

 

To fix this problem, return to the Google API Manager. (Note: If you haven’t set up a Google Maps API project for your website, please see this article for detailed instructions.) The referrers are set in the Credentials. Click Credentials in the right-hand column in the Dashboard. Then click the Pencil icon to the right of the API key for your Google Maps project. You will want to restrict access to your API Key to avoid having it “hijacked” and going over your quota. Click the Restrict key button on the API key created window as shown below.

 

 

Scroll down to the Key restriction heading and select HTTP referrers (web sites). Add the following referrers to the text boxes below Accept requests from these HTTP referrers (web sites), replacing example.com with your domain name:

  • *.example.com/*
  • *example.com/*

 

 


 

Now, scroll down and click the Save button to save your changes.

This article covers ensuring your referrers are properly inserted in your Google Maps API project.  If you need further assistance, feel free to post on our Support Forums or visit our Support Desk.

 

Was this article helpful to you?