I have our website running in the Hubspot CMS and I need to know the domains which are used to work in the back-end. My Google Map doesn’t show in the back-end.
The answer from the Google maps developer: You’ll need to add the HubSpot CMS domain to the API key restrictions.
HubSpot typically uses a domain like *.hubspot.com or similar for its CMS preview. However, you may want to confirm the exact domain by checking the preview URL.
Add the HubSpot CMS domain, such as .hubspot.com or preview.hubspot.com (if you know the specific subdomain used for previews) to the application restrictions,
After adding the necessary domain(s), save the changes to update your API key restrictions.
This should allow the Google Maps API to load properly in the HubSpot CMS preview. If the issue persists, double-check the domain settings or consult HubSpot support for any specific domain requirements for the preview environment.
I already have the domains below added to the API, but still the preview doesn’t show the map:
app-eu1.hubspot.com
hsappstatic.net
https://app-eu1.hubspot.com
https://static.hsappstatic.net
hubspot.com
hubspotpreview-eu1.com
www.hubspot.com
Does anybody know which URL to add to the restriction list to enable the map also to show up in the back-end?
Hi @Groap,
what do you mean with “back-end”?
Usually you don’t have to add all the hubspot domains to the API config - unless you’re trying to show a map in a CRM card ![]()
If you want to display a google map on your page you have to include your companys’ domain which is used in HubSpot. Like https://company-name.com
Just a little example:
While creating the code for the very first DHUG From stagnant to scalable I was building some examples with the Google maps API.
During configuration I’ve just placed https://developer-hug.com as a working domain in the API config since this domain was connected to the portal I’ve build the module in.
hope this helps,
best,
Anton
Hi Anton,
With back-end I mean working in Hubspot itself, maintaing the website. The preview of the map is not showing there and it was there when the API was not restricted.
I already added our own company URL and the map is working good on our website.
So I need to add the URL the Hubspot domain where the CMS is shown. Hupspot customer service doesn’t know this and I already tried all the URL’s listed above.
Does anybody know how to make this work?
Hi @Groap,
you don’t need to add default HubSpot URLs like the ones you’ve mentioned above to the Google Maps API. The only domain(s) you need to add are the ones from your company that are connected to HubSpot.
If you have something like
connected and want to use the Google Maps API/Module on those, you’ll need to paste only this in Google.
As for usage in HubSpot:
Build your module/function which should connect to the API and use only the API there.
best,
Anton
Nope, the map is not showing in Hubspot CMS and it shows on our website. It gives this error:
Google Maps JavaScript API error: RefererNotAllowedMapError