We're experiencing difficulty. Our engineers are on it. Please check status.mailgun.com for real-time updates.

Click Tracking Links Won't Resolve

You're looking to track your sending's engagement, so you've enabled click tracking. However, the click tracking links, for some reason, will not resolve. Not to worry - we have a few common troubleshooting tips to help get your links up and running.

Check CNAME

The first step we recommend is to make sure you have the CNAME record for the sending domain properly configured. The tracking hostname should return mailgun.org for the US region, or eu.mailgun.org for the EU region. This can be easily checked in a terminal using a dig command (Linux/Mac) or an nslookup command (Windows). If the terminal scares you, you can always use a web-based tool like MX Toolbox

Note: The CNAME will not return if you've configured the CNAME as proxy/CDN, such as CloudFlare.

Dig: 

$ dig -t CNAME email.domain.tld +short

Nslookup: 

nslookup -q=CNAME email.domain.tld

You should receive the response "Mailgun Magnificent API" if you make an HTTP request to the base tracking hostname, like below: 

$ curl -s http://email.domain.tld
Mailgun Magnificent API

Check HSTS

Mailgun currently only supports HTTPS tracking links via the use of a configured CDN; more information on that in this article. The source of your issue might be a combination of this element of our system with your settings relevant to HSTS. HSTS tells browsers to enforce HTTPS connections to the domain.  This will result in the tracking links timing out.  The following curl request will quickly confirm if HSTS is enabled: 

$ curl -s -D- https://domain.tld/ | grep -i Strict
strict-transport-security: max-age=2592000; includeSubDomains; preload

You'll need to disable HSTS or use a different domain without HSTS for the tracking links to resolve. If you are unable to disable HSTS, or your use case requires HTTPS, you can check out the help article detailing the steps needed to enable HTTPS tracking links via the link above. 

Check Original Links 

Another element to check is verifying the original links are valid. The best way to do this is to grab the original MIME via either the API or the control panel, providing the message is less than 3 days old (the amount of time our system retains message bodies).

Inside the Mailgun Control Panel (options displayed down the left-hand side on a dark column), use the following instructions:

  • Click Sending on the left of your screen.
  • Select your specific domain
  • Click on Logs
  • Search for the specific message-id in the blank on the right.
  • On the line of the specific log entry, click the three-dot icon. From its dropdown, click MIME, and you should see the full MIME immediately.

Once you've obtained the MIME, you can inspect the links to see how they looked before they were rewritten to ensure the original links are valid.

Of course, if you are still having trouble with non-HTTPS click tracking links after trying all of the above, please do not hesitate to reach out to our Support team via the Support option in your Mailgun control panel!

Powered by Zendesk