Internet Marketing Agency | WordPress Websites & Online Marketing

How to generate and set a Google Maps Geocoding server key

Follow

How to generate and set a Google Maps Geocoding server key

Since June 2016, Google Maps requires a special Google Maps Geocoding server key to “translate” addresses into geographical locations (longitude/latitude). Without this key, Yoast SEO: Local may not be able to make this translation for you.

Before you can set this server key in your Yoast SEO: Local installation, you’ll need to generate it. This tutorial will show you how to do that.

  1. Generate a Geocoding server key
  2. Set your Geocoding server key

 

Generate a Geocoding server key

1.
Go to the Google API Console.
2.
Create a new project or select an existing project.

 

a.
If you do not have an active API project yet, you’ll be asked to agree to the terms of service. A new project will be created automatically.
You will have to agree with the terms of service
b.
If you already agreed to the terms, you are requested to select an existing one, or create a new project.
Select existing, or create a new project
3.
Click Continue to enable the API and any related services.
4.
On the Credentials page, select Google Maps Geocoding API and Web Server (e.g. node.js, Tomcat) if requested.
Select Geocoding API and Web Server
5.
Name your server key and restrict it to your server’s IP.
Enter your server's IP to restrict to it
6.
Copy the generated server key from the popup, you’ll need this toset your server key later.
Popup containing your server key
7.
To prevent quota theft, secure your API key following these best practices.
8.
(Optional) Enable billing. See Usage Limits for more information.

 

Set your Geocoding server key

1.
Copy the server key you generated from the Google Maps API Manager.
2.
Log in on your WordPress Admin and navigate to SEO > Local > API Keys.
Navigate to the API keys page in Yoast SEO: Local
3.
Paste the server key you copied in step 1. into the ‘Google Maps API server key’ field.
Enter your server key
4.
Click Save Changes to store your server key.
5.
Your site should now be able to automatically calculate the latitude and longitude for locations you add.
Have more questions? Submit a request