⛔ RefererNotAllowedMapError

Spatialized founder Jozef Sorocin
Jozef Soročin
Updated 07/13/2025

Each API key can be restricted to a list of referrers (also called “ origins ” or simply “ websites ”).

If the key is used on a website that isn't on this list, Google Maps responds with a RefererNotAllowedMapError.

You are likely:

  • Using an API key you don't own (e.g. when copy-pasting code from StackOverflow snippets.)
  • Running Google Maps from a (sub)domain (e.g. demo.gmapsbook.com) or a sub-page (e.g. gmapsbook.com/abd/xyz.html) which aren't matching the referrer patters.
  • Using a Production API key on localhost:xyz which is purposefully excluded from the list of referrers.

If you don't have access to the Google Cloud Console, contact your site administrator or coworker responsible for Maps.

Join 200+ developers who've mastered this! Get Complete Access — €19
Already a member? Sign in here