Email Confirmation Link Redirects to 404 Page
-
Hi!
I've noticed that after moving to another server and updating to 1.17.0 the links in emails sent from forum became broken.
The forum is located at https://forum.c4d.space domain. And for emails I use http://mail.c4d.space domain. When new user registers at the forum he must confirm his email by clicking the link in email. And the beginning of the link looks like this: http://mail.c4d.space/ls/click?upn=Ha4sgyd1ZSq....... — which is the page that doesn't exist.I don't know what I did wrong and why it stopped working at the new server. Maybe something wrong with DNS records?
Thank you in advance for the help.
UPDATE 1:
All URLs from any emails delivered from forum redirect tohttp://mail.c4d.space/ls/click?upn=long-hash
.
And even when I manually rewrite link ashttps://forum.c4d.space/ls/click?upn=long-hash
it still brings me to the 404 page:UPDATE 2:
Upgrading forum from 1.17.0 to 1.17.1 didn't help either. -
@aleksei what's the url in your config.json?
-
@pitaj it's "https://forum.c4d.space"
I also tried to take the link from email and manually replace mail. with forum. So that the URL looked like this: https://forum.c4d.space/ls/click?upn=Ha4sgyd1ZSq....... but it also didn't help — I've got 404 error.
And is this link in email generated by NodeBB or SendGrid? (using SendGrid plugin)
-
@aleksei it sounds like something in your email chain is replacing the links. When you click on the link does it try to redirect you somewhere else?
-
@pitaj no it doesn't. Or I can't notice that.
And one more thing: I've just noticed that all URLs in any emails sent from forum link to the http://mail.c4d.space/.
I've updated the SendGrid API key and virified my domains (CNAMEs in DNS) once again, but it didn't help.Maybe the problem is somewhere in the Nginx redirects?
When you visit this link http://mail.c4d.space/ you will see the default Nginx welcome page. I don't know whether it is normal or not. Also the default block in the/etc/nginx/sites-available
looks like this:server { listen 80 default_server; listen [::]:80 default_server; root /var/www/html; index index.html index.htm index.nginx-debian.html; server_name _; location / { try_files $uri $uri/ =404; } }
But most probably the problem is hidden somewhere on the stage of email template compilation (or link generation) before sending. But I don't know where and how to fix this...
-
The forum is located at https://forum.c4d.space domain. And for emails I use http://mail.c4d.space domain.
I'm confused as to where the mail subdomain comes into it. Is this a self hosted sendgrid at the mail subdomain?