Verification Email URL Getting Changed to Include /ls/click/ when Using SendGrid
This article provides a solution to an issue where Sendgrid is enabled as the custom email provider, and the URL in outgoing emails is being updated. In all verification emails, the {{ url }} value is being generated as "http://url4955].[CUSTOMER_DOMAIN].com/ls/click?upn=[...].
The link should be generated as "https://[YOUR_AUTH0_DOMAIN]/u/email-verification?ticket=[TICKET_ID].
- Sendgrid
- Emails
SendGrid offers a feature called Click Tracking, which allows customers to track when links are clicked in an email. When this feature is enabled, SendGrid scans the outgoing emails and replaces the links with a link generated by SendGrid.
For example, an outgoing email has a link such as this one.
<a href="http://my_link"" Please Click Here</a>
When SendGrid's Click Tracking feature is Enabled, the outgoing email with the embedded link will be updated to something like the following:
<a href="https://u9946203.ct.sendgrid.net/wf/click?upn=nDeVIc0FUsgX2zv"" Please Click Here</a>
Disable Click Tracking on the SendGrid side, as described in Tracking Settings.
If turning off Click Tracking in SendGrid settings is not an option, then use the clicktracking=off attribute in the Auth0 email templates. Simply add the attribute to any links in the auth0 email templates that should not be tracked.
<a clicktracking=off href="http://my_link" Please Click Here</a>
This change is easy to make. It will allow for keeping Click Tracking enabled for any email campaigns that are running and ensure that SendGrid does not change the outgoing email links when sending an email from Auth0 using an email template.