How to generate and set a Google Maps Geocoding API (server) key

Warning: You must have a Google account with billing enabled to generate a key for Google Maps API.

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. For the Google Maps API JavaScript key visit this page.

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.

Table of Contents

Generate a new API key

  1. Go to the Google Maps Platform
  2. Click ‘Get Started’
  3. Check ‘Maps’, ‘Routes’ and ‘Places’
    Google Maps Enable APIs
  4. Click ‘Continue’
  5. If you want to use an existing project, please select it from the list. Otherwise, select ‘Create a new project’ and enter a project name.
  6. Click ‘Next’ to continue
  7. Click ‘Next’ to enable the APIs for the project
  8. Copy the generated API key from the popup, you’ll need this to set your key later.

View your existing API keys

  1. Go to the Google Maps Platform
  2. If the side menu is not visible, click the three line (hamburger) menu icon
  3. Click ‘APIs & Services’ (API icon)
  4. Click ‘ Credentials’ (key icon)

Add API key to Yoast SEO: Local

  1. Copy the API key you created from the Google Maps Platform.

  2. Log in to your WordPress website.

    When you’re logged in, you will be in your ‘Dashboard’.

  3. Click on ‘SEO’.

    On the left-hand side, you will see a menu. In that menu, click on ‘SEO’.

  4. Click on ‘Local SEO’.

    The ‘SEO’ settings will expand providing you additional options. Click on ‘Local SEO’.

  5. Click on ‘API Keys’. 

    Admin SEO Local SEO API keys

  6. Paste the API key you copied in step 1 into the ‘Google Maps API server key’ field. 

  7. Click ‘Save Changes’.

If you have trouble translating addresses into geographical locations, please verify that the Google Maps Geocoding API is enabled in the Google Maps API Manager.

Check to See if Google Maps API Keys are Working

To check to see if your Google Maps are working try adding one using a sidebar widget, a shortcode, or a shortcode button here.