Skip to main content
All CollectionsTroubleshooting and FAQsCommon Issues
How to Fix Google Maps JavaScript API Error: RefererNotAllowedMapError
How to Fix Google Maps JavaScript API Error: RefererNotAllowedMapError

Learn how to troubleshoot and fix the Google Maps JavaScript API error “RefererNotAllowedMapError” to ensure your maps display correctly.

Updated over 3 months ago

Encountering the “RefererNotAllowedMapError” when using the Google Maps JavaScript API can disrupt the functionality of your map integration on your website. This error typically occurs due to incorrect API key settings or restrictions.

This article will guide you through troubleshooting and fixing this error, ensuring your Google Maps API works seamlessly and your maps display correctly.

Check the browser's Console for errors

  1. Switch to the Console Tab

  2. Check for errors

Usually, the following error will be displayed:

Google Maps - API error

Fix Google Maps JavaScript API Error: RefererNotAllowedMapError

  1. Log in to your Google Developers Console account

  2. Select the Project used for your Divi website

    Choose the Google Project associated with the Divi Website

  3. Click on the APIs & Services button

    Google's API page
  4. From the left Sidebar, click on the Credentials option

    Google API's credentials

  5. Click on the API key used on your Divi Website

  6. Check if, under Set an application restriction, the Websites option is enabled

    Set an application restriction

  7. If it is checked, ensure that the Website restrictions are correctly added and there are no typos

    Check for typos in the Website Restrictions area

In the example above, both URLs contain two typos. We need to fix those typos for the Google Maps API key to work correctly.

Fix typos in the Domain URLs

The correct values in this example are:

  • *.eduard.divi.support

  • *eduard.divi.support

Notes:

  • Changes may not appear instantly, and a delay could occur before Google updates the data. Usually, it takes a few minutes.

  • If you have trouble setting the correct values for the domain, you can also choose None in the Set an application restriction option

Having the Google Maps API correctly configured, there will be no errors displayed in the browser's Console tab, and the Map module will correctly display the Google Map:

Divi Map Module using the correct Google Maps API key
Did this answer your question?