Activate Email Redirect

AI-generated summary

The discussion revolves around an issue with email redirects in a Discourse setup. mynameisausten reported that upon user signup, the email sent contains a link with a subdomain that doesn’t belong to their domain (http://url4685.visavice.com/ls/click?upn=blahblahblah). The link is generated from their email template, which uses %{base_url} and a hardcoded URL. supermathie suggested that the issue is likely due to Sendgrid’s url rewriting feature, which tracks clicks of emails sent through it. This solution was confirmed by mynameisausten.

I have just installed and setup Discourse on an Ubuntu v20 EC2 instance with Sendgrid as my smtp and all is well except for the email that is sent out on user signup - it seems that while the text is correct, something is injecting a subdomain into the link that is definitely not mine and then redirecting to a non-existent url.

Here is my email template for a new signup:

Click the following link to confirm and activate your new account:
 %{base_url}/u/activate-account/%{email_token}
 https://www.visavice.com/u/activate-account/%{email_token}

I sent a test with this template and can confirm that both the %baseurl and the ‘hardcoded’ url both end up pointing to a

http://url4685.visavice.com/ls/click?upn=blahblahblah

The ‘url4685’ is not my subdomain - which I checked on Route 53

I’m looking for a place to start, I’ve done all the testing I can think to do, but since this is my first Discourse deployment I would appreciate any pointers.

If you want to test this, the site should be (at least kinda) live - I may bring it down for testing and restarts while I try to sort this out.

This is most likely Sendgrid doing url rewriting to track clicks of emails sent through it.

That was exactly the case! Thanks @supermathie