Google Maps API key referrer tester
Paste the website restrictions from your API key and the pages your map appears on. The tester shows which pages Google would accept and which would get RefererNotAllowedMapError. It runs entirely in your browser; nothing you type is sent anywhere.
How Google matches website restrictions
When a page loads the Maps JavaScript API, Google compares the page address against the website restrictions on the key. If no pattern matches, the map fails with RefererNotAllowedMapError. The tester follows the rules Google documents:
- *.example.com matches any subdomain, such as www.example.com or shop.example.com. It does not match the bare example.com, so list that separately.
- A pattern without a path, such as www.example.com, covers the home page only. Add /* to cover every page.
- A wildcard can only replace a subdomain at the start or the rest of a path at the end. mysubdomain*.example.com isn't valid.
- If a pattern includes a scheme such as https://, only that scheme matches. If it includes a port, only that port matches.
Why some results say “only with full referrer”
Browsers don't always send the full page address. Under the default referrer policy, many requests carry only the origin, such as https://www.example.com/. A pattern tied to one path, like example.com/contact, then stops matching for some visitors even though it works when you test it yourself. The tester checks both forms and flags pages that depend on the full address. Host-wide patterns ending in /* avoid the problem.
Patterns for common set-ups
| You want to allow | Add these patterns |
|---|---|
| Every page on the domain and all subdomains | example.com/* and *.example.com/* |
| Every page on www only | www.example.com and www.example.com/* |
| A staging host | staging.example.com/* |
| Local development on port 8080 | localhost:8080/*, ideally on a separate development key |
Changes to key restrictions can take a few minutes to apply. If your patterns test correctly here but the map still fails, the page may be sending a different key from the one you edited. Our guide to fixing RefererNotAllowedMapError covers the other causes, and a free scan shows exactly which key and address your live page sends.
It applies Google's documented rules. Google doesn't publish its matching code, so treat an unusual result as a prompt to test on the live page. Restrictions on Android apps, iOS apps and IP addresses aren't covered.