- Click Sign In and you’ll be redirected to Google login page, if you don’t have an account, you should create one.
- Click GET A KEY to create a new project and create a new API Key.
- Enter your project name, click Yes, then CREATE AND ENABLE API.
- Copy the API Key provided for your site.
- To restrict your API Key for your site only to prevent quota theft, go to Google API Console Credentials.
- Click the API Key that you’ve created, you can rename the API Key Name to make it more organized.
- Click HTTP referrers (web sites) and enter your website address using these formats mywebsitename.com/* and *.mywebsitename.com/*
The wildcard * and /* is added to include your subdomain and subdirectories.
- Click Save Changes.
Note: It may take from 5 minutes or more for your new API key to take effect if you add restriction to your API Key. If you are experiencing error on maps, follow the checklist below.
- Confirm the API Key you copied and pasted is correct.
- Make sure your domain name matches the one you’ve registered with the API Key. A slight misspelling will prevent the maps to work.
For more information about Google Maps APIs, visit Google Maps APIs Documentation page.