8 months ago
Hey there, got kind of a weird one/newbie question:
Some background on my setup:
Domain is registered with name cheap
Frontend is nodejs in railway (mydomain.com)
Backend is go-gin in railway (api.mydomain.com)
Using mailersend for user email verification
I'm using mailersend from my domain to send users email verification emails. I have an issue though. Mailersend wants me to put an SPF record (TXT) at the apex. Railway wants me to put an apex CNAME record that forwards to the railway record for my frontend. The trouble is that mailersend's SPF record verification gets upset about the CNAME record at the apex.
Trying to figure out what I should do here. I think I have a few options but wanted to hear from anyone here. It's possible I'm doing something dumb also.
I thought perhaps I could just try to use noreply@mail.mydomain.com as the FROM in my mailersend requests (instead of just noreply@mydomain.com) and then put their records on that instead?
Anyway, any help is appreciated 🙂 hope y'all are having a nice weekend
5 Replies
8 months ago
Hello,
You are not doing something dumb at all.
But you do have two options here:
Use Cloudflare as a proxy. This way, the apex of the domain will actually be an A type. Then you can set any other records without clashing with the apex CNAME. This also has the benefit of providing DDoS protection, since we do not provide that.
As you mentioned, send mail from a subdomain, such as notifications.domain.com, newsletter.domain.com, or even mail.domain.com.
Or both. We at Railway do both. The root domain is managed through Cloudflare, and we have specific subdomains for email, like notify.railway.com.
Best,
Brody
8 months ago
Sounds good!
8 months ago
!s
Status changed to Solved brody • 8 months ago