Q: Devise forgot password url in email sending user to wrong link Having a hard time figuring out this bug. We've got devise on Rails 5.2 and have a staging and production site. When user requests forgot password from staging site, the url that comes through the email takes the user to the correct link to reset their password. In production, the link from the forgot password email is not right, and it's taking the user to an internet search page instead of the path to our website where they can reset their password.
Any idea why the production link is taking the user not to our webpage?
We send emails from sendgrid. Routes and info below...
edit_user_password GET    /users/password/edit(.:format)                                                           devise/passwords#edit

<p>Hello <%= @resource.email %>!</p>

<p>Someone has requested a link to change your password. You can do this through the link below.</p>

<p><%= link_to 'Change my password', edit_password_url(@resource, reset_password_token: @token) %></p>

<p>If you didn't request this, please ignore this email.</p>
<p>Your password won't change until you access the link above and create a new one.</p>


A: In case someone else has this issue and can't figure out what's going wrong, this was actually something wrong in our sendgrid. We were trying to use linkbranding, but the SPF and DMARC settings weren't right. Once we got rid of link branding, the link was fine.
