Mautic application form submission ssl issue

Your software
My Mautic version is: 5.2
My PHP version is: 8.1.31
My Database type and version is: 11.2.6-MariaDB-ubu2204

Your problem
My problem is:

In the Mautic application form integration on my WordPress website, I encountered an issue on my webpage.

After clicking the submit button, the form blocks the URL connect.abc.com.

Below, I have attached a screenshot and detailed the error:

Error: Mixed Content: The page at ‘https://abc.com/contact/’ was loaded over a secure connection but contains a form that targets an insecure endpoint ‘http://connect.abc.com/form/submit?formId=2’. This endpoint should be made available over a secure connection.

These errors are showing in the log:

Hello @veera11

Is your Mautic instance running on an SSL-secured (HTTPS) URL?

It looks like Mautic was installed using HTTP instead of HTTPS. Some browsers and security settings may block certain functionalities when HTTPS is not enabled.

You can verify this on your Mautic instance, under Configurations > System Configurations > Site URL.

Best regards,
Ricardo


PS: You have a typo in your field - it should be “Company,” not “Comapny.”

Hi Ricfreire,

Thanks for the update.

Yes we are running Mautic application using HTTPS URL.

First we deployed the mautic on HTTP. After the deployment completion we changed into HTTPS.

We also verified in the Mautic Site URL. For your refrence I have attached the screenshot below.

Hello again,

Understood, that explains the issue you’re facing.

Did you install Mautic using Softaculous? If so, I strongly recommend reinstalling it directly with HTTPS from the beginning to avoid potential misconfigurations. I’ve encountered this issue before, and reinstalling was the most reliable fix.

If you installed it manually or switched to HTTPS later, I recommend clearing Mautic’s cache, as outdated references to HTTP may still be causing issues.

Best regards,
Ricardo

Can you please help us to clear the Mautic cache’s.

Use this command:
bin/console mautic:cache:clear

OR

manually delete the var/cache/ENV folder

More information:
https://devdocs.mautic.org/en/5.x/components/cache.html

We cleared the cache but still the same issue. We also not installed mautic using Softaculous. We have deployed mautic in Ubuntu 22.04 VM.

We are inspects our websites the form has passed the data through HTTP.

We also checked the tracking setting in Mautic is shows some automatic script. In that script the URL is on HTTP.

For your reference I have shared two screenshots. Kindly check and help us to resolve this issue.

Make sure your site’s URL is https.
Then clear the cache.
For form embed code you need to save the form AGAIN before it’s applied.
Joey

Hi Joeyk,

We confirmed, Our site running on https. We cleared the cache also. Still the same error.

Okay.
Can you plz check if in your config/local.php do you have https in front of your domain in your config file?

Hi Joeyk,

We already configured the application with SSL.

Kindly advise on the other possible settings that can be checked.

Thanks

Okay, now show the command output after you reload the cache:
bin/console c:c