Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google Maps API error: RefererNotAllowedMapError [duplicate]

We have a new website(say www.website.com) on Server B which is not live yet, which is using google maps on a page.

The old version of the website is on Server A is not using google maps.

I have created a browser key with domain name - www.website.com and in my hosts file set the IP address of Server B with www.website.com and tried to test google maps, but it is not working.

This is the error I am getting -

"Google Maps API error: Google Maps API error: RefererNotAllowedMapError https://developers.google.com/maps/documentation/javascript/error-messages#referer-not-allowed-map-error Your site URL to be authorized: http://www.website.com/page-that-has-google-map

Any suggestions on how to fix this issue? I want to test the google maps page on Server B and make sure the page is working fine before making the website on Server B live.

TIA

like image 470
lambda8 Avatar asked Oct 27 '25 06:10

lambda8


1 Answers

the website name is www.website.com, but I added website.com, so when I added *.website.com/* to browser key API, that fixed the issue.

like image 152
lambda8 Avatar answered Oct 29 '25 07:10

lambda8



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!