How to fix broken links in WordPress contact form emails caused by SendGrid click tracking

Summary:
A WordPress site was sending autoresponder emails via WP Mail SMTP with SendGrid as the mailer. The embedded link in the email was breaking due to SendGrid’s click tracking feature, which rewrites URLs to route through a tracking domain. This guide walks through diagnosing and fixing the issue.

Issue background

Autoresponder emails from a WordPress contact form included a CTA link that led users to a form application page. However, the link in these emails was not working as expected—it appeared broken or redirected improperly. This caused confusion and decreased lead conversions.

Diagnosis

After examining the email headers and HTML, the Freshy team discovered:

  • The site uses the WP Mail SMTP plugin.
  • The mailer is configured to use SendGrid.
  • The original link was being rewritten by SendGrid for tracking purposes.
  • The rewritten URLs were routing through a SendGrid-managed tracking subdomain.
  • These rewritten links were failing to redirect, potentially due to misconfigured DNS or inactive tracking settings.

Resolution steps

  1. Confirm SendGrid is being used
    – Check WP Mail SMTP plugin settings.
    – Confirm SendGrid is selected as the mailer.
  2. Review SendGrid tracking domain settings
    – Log in to the SendGrid dashboard.
    – Navigate to Settings > Tracking.
    – Verify that the tracking domain is correctly set up with the proper DNS records (typically a CNAME).
  3. Test rewritten URLs
    – Send a test email through SendGrid.
    – Inspect the email source to view the rewritten links and ensure they function correctly.
  4. Disable click tracking if needed
    – Temporarily turn off Click Tracking under SendGrid’s settings.
    – This prevents URL rewriting, allowing your original links to function as intended.
  5. Update email templates
    – If a specific URL continues to break, consider removing or replacing it in the email content while troubleshooting.

Final outcome

Freshy identified that the broken link issue stemmed from SendGrid’s URL rewriting and confirmed that disabling click tracking resolved the problem. The autoresponder email was updated to ensure proper link behavior and improve reliability.

Having trouble with email delivery in WordPress? Contact Freshy — we specialize in SMTP configuration, autoresponder troubleshooting, and third-party service integrations.