0

Yesterday I tried to put a GoogleMap on a website (javascript), but I am still getting the Google Maps API error: RefererNotAllowedMapError.

The following steps I have taken:

  • Created credentials for this website (request an APi Key and add referrer in the API Manager. Accepted request from these HTTP referres is set to *.thewebsitedomein.nl/*)

  • Verify the domain of the website (added a CNAME record in the DNS record)

But I am still getting this RefererNotAllowedMapError.

Regenerating a new key didn't help, can someone please help me? Is there something I forgot to do?

Thanks! AHF

Isabel Inc
  • 1,871
  • 2
  • 21
  • 28
AHF
  • 11
  • 1
  • 4

3 Answers3

1

After adding a new CNAME record (without the www) in the DNS and verifying the website again, the Google map is displayed without javascript errors.

AHF
  • 11
  • 1
  • 4
  • CNAME for apex of a domain is not a good idea: https://serverfault.com/questions/613829/why-cant-a-cname-record-be-used-at-the-apex-aka-root-of-a-domain. It can break your email for example. – Milan Krstic Feb 27 '19 at 21:09
0

From the Google Maps Error Messages documentation itself,

RefererNotAllowedMapError means that 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 API Console.

Also check this related SO questions:

geocodezip
  • 158,664
  • 13
  • 220
  • 245
KENdi
  • 7,576
  • 2
  • 16
  • 31
  • Hi! In my first post I already mentoined the URL for accepted requests from these HTTP referrers is set to `code`*.thewebsitedomein.nl/*`code` – AHF Jul 18 '16 at 07:01
0

See screen dump for the settings

See screen dump for the settings

Modus Tollens
  • 5,083
  • 3
  • 38
  • 46
AHF
  • 11
  • 1
  • 4