Set Up Pretty URLs with Google Maps

Link: https://support.brilliantdirectories.com/support/solutions/articles/12000086439-set-up-pretty-urls-with-google-maps

This article covers the steps to create a second Google Maps API key for use with the Enable All Location Features For "Pretty URL" Search Results Pages Advanced Setting.  This new API key will be set up to work with server-side API calls necessary for this functionality in addition to the Javascript API calls used by the normal API Key used elsewhere on the website.


Create the API Key


Log in to the Google Console Credentials page: https://console.cloud.google.com/apis/credentials


Click on "+ Create Credentials":




Click on "API key":




Click "Close":




Click on Actions >> Edit API Key:




Name the API key and select IP addresses:




Now it's time to add the IPs that have permission to use the key.


First, add the IP address for the Admin of the website, Managemydirectory.com:


216.120.255.180




Next, we also need to add the IP address of the website's server.  To find this IP address, navigate to Settings >> Domain Manager in the Admin of the site. Scroll down and find the IP displayed here:



NOTE: Websites are hosted on different servers, and the IP address shown in the screenshot may be different than the IP address shown in the Admin of the website.  It is important to use the IP address shown in the Admin of the website, even if it is different from the IP address shown above.


Once the Server IP is added, click on "Done":




Click on "Don't Restrict Key":




Finally, click on "Save".  This will refresh the page and display the list of API Credentials saved for the account.



Add the API Key to the Website


Copy the API Key from the Google Console here:



Log in to the Admin of the website and navigate to Settings >> Advanced Settings.  Locate the Advanced Setting called All Location Features For Pretty URL Search Results Pages API Key


Paste the API Key from the clipboard and click "Save Settings":





Finally, locate the setting Enable All Location Features.  With the new API Key added, this setting can be set to "On":