# Mautic generates non-https urls for my landing pages

**URL:** <https://forum.mautic.org/t/mautic-generates-non-https-urls-for-my-landing-pages/33592>\
**Category:** Product Support\
**Created:** [September 24, 2024, 6:30pm UTC](https://forum.mautic.org/t/mautic-generates-non-https-urls-for-my-landing-pages/33592 "2024-09-24T18:30:17Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![mchojrin](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/mchojrin/32/10159_2.png) [@mchojrin](https://forum.mautic.org/u/mchojrin)\
**Post date:** [September 24, 2024, 6:30pm UTC](https://forum.mautic.org/t/mautic-generates-non-https-urls-for-my-landing-pages/33592/1 "2024-09-24T18:30:17Z")

</div>

**Your software**  
My Mautic version is: 5.0.4  
My PHP version is: 8.1.28  
My Database type and version is: 10.11.8-MariaDB-0ubuntu0.24.04.1

**Your problem**  
My problem is:

I established the based URL for my website as `https://mysite.com` but when I got to a landing page, it’s URL is `http://mysite.com:443/landing` instead of `https://mysite.com/landing` and this seems to be preventing forms from being sent…

Any idea how to fix this? Thanks!

---

<div class="post-metadata">

**Author:** ![ricfreire](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/ricfreire/32/14973_2.png) [@ricfreire](https://forum.mautic.org/u/ricfreire)\
**Post date:** [September 24, 2024, 10:31pm UTC](https://forum.mautic.org/t/mautic-generates-non-https-urls-for-my-landing-pages/33592/2 "2024-09-24T22:31:11Z")

</div>

Hi @mchojrin,

I tested it on my Mautic instance, and both the landing pages and the Mautic instance itself are using HTTPS. In your Mautic configuration, under System Settings, does the “Site URL” field include HTTPS?

Additionally, within the System Configuration, under “Additional Response Headers,” you can enable **Strict Transport Security** and see if that resolves the issue for you.

Another option, for example, is in cPanel, where you can force HTTPS. This could also help fix the problem.

I hope this helps!

Best regards,  
Ricardo

---

<div class="post-metadata">

**Author:** ![mchojrin](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/mchojrin/32/10159_2.png) [@mchojrin](https://forum.mautic.org/u/mchojrin)\
**Post date:** [September 25, 2024, 6:12am UTC](https://forum.mautic.org/t/mautic-generates-non-https-urls-for-my-landing-pages/33592/3 "2024-09-25T06:12:41Z")

</div>

Hey @ricfreire , thanks for your help.

My site URL field includes https.

About the Strict Transport Security, I had it activated but de-activated it as a test… same result.

I am self-hosting my Mautic on top of Docker.

---

<div class="post-metadata">

**Author:** ![adiux](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/adiux/32/5793_2.png) [@adiux](https://forum.mautic.org/u/adiux)\
**Post date:** [September 25, 2024, 7:17am UTC](https://forum.mautic.org/t/mautic-generates-non-https-urls-for-my-landing-pages/33592/4 "2024-09-25T07:17:05Z")

</div>

I would also have guessed it is related to the site URL. Maybe clearing the cache will help? (Mautic and browser)

---

<div class="post-metadata">

**Author:** ![mchojrin](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/mchojrin/32/10159_2.png) [@mchojrin](https://forum.mautic.org/u/mchojrin)\
**Post date:** [September 25, 2024, 7:50am UTC](https://forum.mautic.org/t/mautic-generates-non-https-urls-for-my-landing-pages/33592/5 "2024-09-25T07:50:40Z")

</div>

Ok, so something must have had to do with the cache. I cleared it and now I’m falling into an infinite redirect loop 😭

Just checked the nginx configuration, removed the http-\>https redirect, reloaded and the problem continues… something must be wrong inside mautic config… any idea?

---

<div class="post-metadata">

**Author:** ![mchojrin](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/mchojrin/32/10159_2.png) [@mchojrin](https://forum.mautic.org/u/mchojrin)\
**Post date:** [September 25, 2024, 8:17am UTC](https://forum.mautic.org/t/mautic-generates-non-https-urls-for-my-landing-pages/33592/6 "2024-09-25T08:17:02Z")

</div>

Well, it seems I got my solution from [this thread](https://forum.mautic.org/t/udate-to-4-2-runs-into-err-too-many-redirects/23277/4), I just had to add `$_SERVER['HTTPS'] = 'on'` at the beginning of `index.php` and both problems got solved in one shot 🙂

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/1X/43c63600fe51440378769136903f1fa2a9a34102.png) [@system](https://forum.mautic.org/u/system)\
**Post date:** [September 26, 2024, 8:17pm UTC](https://forum.mautic.org/t/mautic-generates-non-https-urls-for-my-landing-pages/33592/7 "2024-09-26T20:17:21Z")

</div>

This topic was automatically closed 36 hours after the last reply. New replies are no longer allowed.
