We've moved discussions to Discord

Divise confirmable and reset password links don't work

Both emails sent for confirming and reset password have subdomains like "https://url9208.domain.com/ls/click?upn=xxxxxx"
And they don't go anywhere. 
I have both production and dev env set this way and have problem in both env:
config.action_mailer.default_url_options = {host: 'mydomain.com'}

Any ideas? I think it's something simple I missed.
correction, it is only doing this in production on heroku using sendgrid. It works fine in development but in production on heroku I am getting the 'https://url9208.domain.com' subdomain in the password reset emails and the confirmable emails. And that link doesn't go anywhere.
This is irritating...
I have a clean jsp install, no subdomain selected. Nothing checked in Accounts under JSP configuration.
I have tried changing in production.rb:
config.action_mailer.default_url_options = {host: 'mydomain.com'} to both 'mydomain.com' and to 'www.mydomain.com'
I have tried adding  host: 'domain.com" to the confirmation_url in 'confirmation_instructions.html.erb
I have tried adding ActionMailer::Base.default_url_options = { :host => 'mydomain.com' } to devise.rb

And all password reset and confirmable emails produced by the app on the heroku app have a subdomain of 'url9208.mydomain.com' and so none of those links work. Sending email from a separate contact page on the app works fine. It's just emails being sent by devise.

Anyone have any other ideas?

Found the answer finally! Someone replied to my StackOverflow:

"Assuming you use SendGrid.. You can try to turn off click tracking to get rid of the url9208. When it is on, SendGrid overwrites the links in your email template and adds a subdomain.
I had an issue because the SSL certificate didn't cover such a subdomain that was added to password reset links. Turning off click tracking worked in my case."
Notifications
You’re not receiving notifications from this thread.