Digest mail link failed to open

AI-generated summary

A user, sessionstart, reports that links in their Mailgun-sent digest emails fail to open, timing out in the browser. pfaffman suggests the issue may stem from Mailgun rewriting links for click tracking, and asks if the hostname in the links matches the site’s domain — it doesn’t; links point to email.mail.example.com while the site is example.com. pfaffman advises disabling link rewriting or setting up a CNAME record for email.mail.example.com as Mailgun instructs. sessionstart confirms they need click tracking for analytics and notes other Mailgun services (e.g., newsletters) work fine, implying those domains have proper CNAMEs. kraml confirms the issue is due to link click tracking being enabled, which forces Mailgun to rewrite links to its own server. kraml clarifies that to keep click tracking enabled, a CNAME record named “email” must be configured for the sending domain, pointing to Mailgun’s server — a step outlined in Mailgun’s domain configuration docs. sessionstart thanks the helpers and plans to contact Mailgun for further guidance. The core issue is misconfigured DNS: without the correct CNAME, Mailgun’s tracking links fail, even though the service itself is otherwise functioning correctly for other domains.

Hello awesome guys!

I found that the links in the digest mail sent by mailgun are all failed to open. The browser shows me that it took too long to respond.

Please help!

You’d need to include more info. My guess is that mailgun is re-writing the links, maybe? What is the hostname in the links? Is it the same as your site?

Hi Jay,

Thanks for your reply and help!

The hostname in the links are not the same as my site. Let’s say, if my site were example.com, the link is email.mail.example.com.

Yes, mailgun rewrites the links for collecting click info.

Any solutions?

Tell mailgun not to rewrite the links.

Oh, and/or create the CNAME for email.mail.example.com like mailgun told you to.

Oh, if not rewrite links, will mailgun still be able to collect clicks/open info? I need that! lol

I use mailgun for other service as well, such as newsletter etc, they also rewrite the links, but I can click without any issues.

My guess is that those have a different domain name that you did set up the CNAME for.

I’ll ask mailgun about this! Really appreciated for your help! :heart_eyes:

It’s because you turned on link click tracking in your domain settings so mailgun rewrote your links to point to that server.

Yes, you got it! So if I want the link works, do I have to turn off the link click tracking?

I need click tracking for other services written in other languages. Any ideas?

Click tracking requires you to setup a CNAME record of “email” for your sending domain and point it to mailgun server. It is in the domain configuration page. I don’t use it so I’m not sure about setup detail but according to mailgun document it seems that’s the only step required.