Persistent Google Maps API Error: ApiTargetBlockedMapError

Subject: Persistent Google Maps API Error: ApiTargetBlockedMapError with HivePress/ListingHive

Message Body:

Hello HivePress Support Team,

I am experiencing a critical issue with Google Maps not loading on my WordPress website (https://supportingmarathimanus.com/) which uses HivePress and the ListingHive theme.

Specifically, the map field on my listing submission page (https://supportingmarathimanus.com/submit-listing/details/) consistently displays the error: “This page can’t load Google Maps correctly.”

When I check the browser console, I see the following critical error: This API key is not authorized to use this service or API. Places API error: ApiTargetBlockedMapError https://developers.google.com/maps/documentation/javascript/error-messages#api-target-blocked-map-error

I have already performed extensive troubleshooting on the Google Cloud Platform side and my WordPress installation:

  1. Google Cloud Project: My website’s project (“Listing hive”) is correctly linked to a verified “Individual” billing account.
  2. API Key: I have generated a new Google Maps API Key and confirmed it is entered correctly in HivePress settings.
  3. API Enablement: For the “Listing hive” project, I have confirmed that the following essential Google Maps APIs are enabled:
  • Maps JavaScript API
  • Geocoding API
  • Places API
  1. API Key Restrictions: The API key is correctly restricted:
  • Application restrictions: HTTP referrers (web sites)
  • Website restrictions: *.supportingmarathimanus.com/* and supportingmarathimanus.com/*
  • API restrictions: The key is restricted to use only the Maps JavaScript API, Geocoding API, and Places API.
  1. Caching: I have cleared all server-side caches (Hostinger) and browser caches. I do not have any active WordPress caching plugins.

Despite all these confirmed correct configurations, the ApiTargetBlockedMapError persists.

Could you please provide guidance on this? Are there any specific HivePress configurations, known conflicts with other plugins, or additional API requirements (e.g., for server-side geocoding that might use a separate key or restriction type) that could be causing this issue?

Thank you for your assistance.

Hi,

Thanks for the request. Please note that this error is not related to HivePress settings, but exclusively to Google Maps API settings. Please see the detailed information about this error at the following link: Error Messages  |  Maps JavaScript API  |  Google for Developers

Also, please make sure that you set up Google Maps correctly. You can refer to this doc How to get a Google Maps API key - HivePress Help Center.

If you are having difficulties with Google Maps settings, we recommend using MapBox. It is easier to set up. You can check out this document to set it up: How to get a Mapbox API key - HivePress Help Center.

I hope it helps