After some problems with the hosting of a site, and subsequent DNS issues, I mostly have it running again, except I just noticed this issue with the user account emails , password reset, where the token one-time-login-url is translated to the wrong domain.

The main site domain is short. As is the base_url in settings. It's MX is a long version. The email created reads as the short version, but is linked to for example http://url495.longexampledomainname.com/ls/click?upn=u001.jHM1mNur-2BVTMbKbfcSGfkJE8Y8Za8nzIm60hhD7xz0pOJrvVW3gNpkSxCy5c5N1OOb36Ffndc6tLwf6U4tJodAxNfPxcI3M7sUDM-2F6LteqT63Nsn6odmXmsHdzMxTOoNE1B2Eufw6Eq3Cbrd1YE8Gg-3D-3DtphL_QXnTW6f9jV7ots26-2Fd0iCGrYGlreQEPEAz2StRzty6b-2FR2XaMVBT5DNpqBdVpMIrGJVuyJuYnJWqD2UUFdL5A-2FV3md20f6cwSOxaqreUHdNJ7cZpZLFrRrqGD9F5kIM76B7c691lwrJ2Wi6mf2ibqYSKlZHdibC0-2Bi9HWefCanM4ZzWoAkSL2nFWKR4-2FFoG3CzXNPB3qGeiWFMN9bw2spCSlKjGir4nop49BhMtHUa-2F21933axoeNsSSNif6ovR-2FPMATLbhEB9A-2Bz9L4fTLVJW4JoNVx79a19XujVkOLL5J3P7ljHK0JoeU-2FCHv96k1syPIlMw6-2FgcpBiUoCvbqRwBwdGma5O2k6n6Ve95c-2FO10XKxw0sP-2BBzhUWXukx90Ub
I cannot figure out why this is, how it worked previously, where the url495 stuff is coming from.

Most helpful answers

Is the URL getting rewritten by your email delivery service to add tracking to clicks, etc?

Can you enable Devel and run this:

global $base_url, $base_secure_url, $base_insecure_url;
dpm($base_url);
dpm($base_secure_url);
dpm($base_insecure_url);

and see if you are getting the correct values for those urls?

Comments

Can you enable Devel and run this:

global $base_url, $base_secure_url, $base_insecure_url;
dpm($base_url);
dpm($base_secure_url);
dpm($base_insecure_url);

and see if you are getting the correct values for those urls?

Thanks. I am getting the short versions of all of them.

Is the URL getting rewritten by your email delivery service to add tracking to clicks, etc?

Probably! The site uses Sendgrid. I'll dig into that area, thanks!