How do I resolve mixed content warnings on an SSL site?

Applies to:

If your HubSpot-hosted website is set up using SSL (HTTPS), assets being loaded over HTTP will be blocked from loading by your browser. HubSpot automatically ensures all HubSpot-hosted resources are protocol-less to ensure they load without issue. However, if you are loading assets from an external server via HTTP, the asset will not load once SSL is enabled.

You can see any assets that are being blocked in the Javascript console of your browser's developer tools.

To resolve mixed content warnings for resources loaded from a non-HubSpot domain, use the HTTPS version of the URL, if possible. If the external site does not support HTTPS requests, you will need to contact that domain's admin to see if they can make their content available over HTTPS. As an alternative, if the source file does not support HTTPS, upload the asset to your file manager, and reference that URL instead.

Using Developer Tools' Console can help you identify which files are being blocked. Below are some typical locations in HubSpot that may make requests to these non-secure resources.

References in stylesheets or scripts

One of the most common sources of mixed content warnings are non-HubSpot hosted files in your site's stylesheet.

@font-face references that load externally-hosted fonts

Background image urls

@imports of external stylesheets

Additionally, if you are using custom scripts that reference any external assets, you will want to update those files as well.

Scripts and stylesheets

If you are attaching external stylesheets to the <head> section or footer of your site, your template, or your page, you will need to ensure that these files support HTTPS requests. These references can be added to HubSpot in the following locations: