Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Lars-Janssen's avatar

Gmail is changing <a href"" to wrong link

Hi,

In Laravel I'm sending a plan html mail with an <a href="https://mydomain.com/movies"> tag. However when I open this mail in gmail and click on the link it's redirecting to:

http://email.mydomain.com/c/eJwVjktqxDAQRE9j7zSoP_p44UU2uUdLankcbM9gacj1o0BRFI-CqrKCBJj3dZFKGYepj0SILjl2LkUFSCVgnNi23732x6aX3tK1zM81hgAONEeq4gtgdYq8sGLO1jq087E-e3-3ib4m_B4qr60eH72yPvLrHKB90rn3ERwgsbA3BYgMc40mQgZTMkINmECXMGo1iWLJYjhENgykZgFCQ6HUQt6jJT_f6yF3-5GrNb08j-vbKfvxP_kHeflFfA

Why is google redirecting to a non existing mail subdomain on my site?

The mail html looks like this:

Schermafbeelding-2021-04-14-om-22-34-57

Any idea how I can fix this?

Thanks

0 likes
7 replies
Lars-Janssen's avatar

Thanks for helping, that url is correct! Very weird issue...

Lars-Janssen's avatar

Yeah I know that but still weird that eventually they redirect me to a subdomain on my own site.

1 like
Snapey's avatar

check what the original email contains. Google can't just invent a subdomain

farzanbd's avatar

I had the same issue. My email service provider (Mailgun) is replacing my email links with tracking links to track clicks. I just had to set the tracking protocol in Mailgun from http to https, which fixed it. You may also check a similar setting in your mail provider.

Please or to participate in this conversation.