Google Maps JavaScript API RefererNotAllowedMapError

Google Maps JavaScript API RefererNotAllowedMapError

We’re trying to develop an geoplacement app for one of our clients, and we want first to test it in out own domain.
We have signed for Google Maps JavaScript API, and we have a valid browser key and our domain,, has been authorized to use that key.
But we can’t make even the easiest example to run without error.
We have, in our domain and with our key, the following demo:
But it doesn’t work, and Firebug console says:
“Google Maps API error: Google Maps API error: RefererNotAllowedMapError (link to Google documentation on RefererNotAllowedMapError) Your site URL to be authorized: (1)”
My credential page is missing the possibility of adding referrers to accept, so solutions involving adding referrers are not possible right now.
My credential Page:

Why do we get that error? How can we fix it?


Solution 1:

I know this is an old question that already has several answers, but I had this same problem and for me the issue was that I followed the example provided on and entered my domains in the format *.domain.tld/*. This didn’t work at all, and I tried adding all kinds of variations to this like domain.tld, domain.tld/*, *.domain.tld etc.

What solved it for me was adding the actual protocol too; http://domain.tld/* is the only one I need for it to work on my site. I guess I’ll need to add https://domain.tld/* if I were to switch to HTTPS.

Update: Google have finally updated the placeholder to include http now:

Google Maps API referrer input field

Solution 2:

Come on Google, you guys are smarter than the API Credential page lets on. (I know because I have two sons working there.)

The list of “referrers” is far pickier than it lets on. (Of course, it should be more forgiving.) Here are some rules that took me hours to discover:

There are probably other rules, but this is a tedious guessing game.

Solution 3:

According to the documentation, ‘RefererNotAllowedMapError’ means

The current URL loading the Google Maps JavaScript API has not been
added to the list of allowed referrers. Please check the referrer
settings of your API key on the Google Developers Console.

I have the Google Maps Embed API set up for my own personal/work use and thus far have not specified any HTTP referrers. I register no errors. Your settings must be making Google think the URL you’re visiting is not registered or allowed.

enter image description here

Solution 4:

I tried many referrer variations and waiting 5 minutes as well until I realized the example Google populates in the form field is flawed. They show:


However that only works if you have subdomain. or www. in front of your domain name. The following worked for me immediately (omitting the leading period from Google’s example):


Solution 5:

Just remind that if you just change it, it may take up to 5 minutes for settings to take effect.

Solution 6:

According the google docs
this happened because the url on which you are using the Google Maps API, it not registered in list of allowed referrers


From Google Docs

All subdomains of a specified domain are also authorized.

If is authorized, then is also authorized. The reverse is not true: if is authorized, is not necessarily authorized

So,Please configure domain, then your will start work.