# Links behind HAPROXY

**URL:** <https://forum.mautic.org/t/links-behind-haproxy/18425>\
**Category:** Product Support\
**Created:** [March 3, 2021, 4:38pm UTC](https://forum.mautic.org/t/links-behind-haproxy/18425 "2021-03-03T16:38:42Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![lgwapnitsky](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/lgwapnitsky/32/1623_2.png) [@lgwapnitsky](https://forum.mautic.org/u/lgwapnitsky)\
**Post date:** [March 3, 2021, 4:38pm UTC](https://forum.mautic.org/t/links-behind-haproxy/18425/1 "2021-03-03T16:38:42Z")

</div>

**Your software**  
My Mautic version is: 3  
My PHP version is: 7.3  
My Database type and version is: MariaDB

**Your problem**  
I’m running mautic on a linux box behind HAPROXY running on a pfsense. I have https redirection on the proxy working properly, but all links in mautic are coming up with http, which causes them to fail to load when being sent out.

Is there a setting to modify the links in outgoing emails?

Thank you

---

<div class="post-metadata">

**Author:** ![joeyk](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/joeyk/32/11164_2.png) [@joeyk](https://forum.mautic.org/u/joeyk)\
**Post date:** [March 3, 2021, 8:20pm UTC](https://forum.mautic.org/t/links-behind-haproxy/18425/2 "2021-03-03T20:20:53Z")

</div>

Hi, did you configure your SSL in your haproxy or in the container?

---

<div class="post-metadata">

**Author:** ![dimitri](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/dimitri/32/4437_2.png) [@dimitri](https://forum.mautic.org/u/dimitri)\
**Post date:** [March 4, 2021, 5:58am UTC](https://forum.mautic.org/t/links-behind-haproxy/18425/3 "2021-03-04T05:58:01Z")

</div>

When you go in Mautic to Configuration → System settings → Site url… Does it display an url with https?

Mautic uses that setting to generate links in emails. If there is no https links will be with http…

If you use Haproxy to do the SSL, and the connection goes unencrypted to the Mautic server than the Mautic server will be with http. You can try to use SSL on the Mautic server too, and configure Haproxy to use an encrypted connection to the Mautic server.

---

<div class="post-metadata">

**Author:** ![lgwapnitsky](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/lgwapnitsky/32/1623_2.png) [@lgwapnitsky](https://forum.mautic.org/u/lgwapnitsky)\
**Post date:** [March 4, 2021, 8:32am UTC](https://forum.mautic.org/t/links-behind-haproxy/18425/4 "2021-03-04T08:32:04Z")

</div>

I used HAPROXY to do the SSL, and the URL inside mautic has https.

I’ll try generating an internal cert for the mautic server to see if that changes anything

---

<div class="post-metadata">

**Author:** ![joeyk](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/joeyk/32/11164_2.png) [@joeyk](https://forum.mautic.org/u/joeyk)\
**Post date:** [March 5, 2021, 4:26pm UTC](https://forum.mautic.org/t/links-behind-haproxy/18425/5 "2021-03-05T16:26:42Z")

</div>

Try to add this in the second line of your index.php:  
$\_SERVER[‘HTTPS’] = ‘on’;  
Let me know how that works out!  
Joey
