All email urls are overwritten with Mautic site url, if sending through a campaign

Your software
My Mautic version is: 4.2.1 Mautic docker container behind an IIS server with reverse proxy

Your problem
My problem is:
If sending an email though a campaign ( I am using SendGrid-API as sending service with tracking clicks disabled) all the urls (including Linkedin or any other random website) are overwritten with the Mautic’s site url.
If sending as example, all links work ok (probably because there is no tracking and no redirect is necessary)

These errors are showing in the log:
No errors.

Steps I have tried to fix the problem:
I have no idea where to start & look to solve this issue. I would appreciate any hint. Thanks.

Hi, you can turn off email tracking in Mautic disabling it in the config > email settings.
Once you do it, no tracking url would be used to redirect your links.

Hi, thanks for answering.
Indeed, I can do this, but then I lose all the reporting analytics, as no UTM code gets logged anymore, neither clicks counters. I don’t think this is an expected functionality, as with an older version I don’t have this issue. Thanks!

Okay wait. Url tracking only works is your mautic is rewriting the urls. Maybe I misunderstood your problem.

Can you send me an example link that doesnt work in pm?

Yes, I’ll send you such an url in a pm.
So, the problem is that the url gets redirected (the final destination) to Mautic’s domain, although it’s a linkedin link in email.
Thanks for looking into it.

Okay, is the email published?

Yes, it is. It’s public & published.

Are you sure your link is okay?
If I replace to https://linkedin.com/ from your domain, it works.
I suspect you didn’t add the right link to the URL.
It should start with https://

Yes, I’ve rechecked all of them many times. All the links work fine if the email is not sent through a campaign. Also, in Email stats, in Mautic / Click Counts they are counted & displayed as expected. So, only the redirect fails, if the destination is other than mautic domain.

Could you plz pm me the original link?

In case anyone will have the same issue and land here: the issue was at server level. Rewrite headers was forced on server level, but should not do this by default. Once this was disabled, the urls work fine.

@joeyk thanks again for your support.

2 Likes

For those using IIS and AAR to rewrite, the above is acheived by unticking the “Reverse rewrite host in response headers” is unchecked in proxy server settings. See this serverfault post for more detail.