9
votes

My website uses the Google maps API (3.0) in a very heavy way. I had to register my application with Google APIs Console.

In the "referers" section I put *.websitename.com/* (there is * at the start and at the end), but when I try to access maps from http://websitename.com it doesn't work and appear, and a Google message appears in the console saying it's unauthorized from this referrer (403 Error).

How can I write the "referers" to allow both

http://www.websitename.com

and

http://websitename.com

as referers?

1
Why did you add a . before the domainname? - Karl-Johan Sjögren

1 Answers

12
votes

There is no single pattern that matches both cases, you must use 2 referers

*.websitename.com/*
websitename.com/*

EDIT : Keep in mind that sometimes it needs 5 minutes for changes to take effect.