R
Railway•2mo ago
Rasmus Lian

SPF records fail because of CNAME to railway domain

Hi, I have a website hosted at Railway via CNAME (as is the only option provided). Now I realized that it is not possible to have CNAME and at the same time have SPF TXT records for the same domain. SPF checks for emails fail because of this. Are there any workarounds? Thank you in advance 🙂
21 Replies
Percy
Percy•2mo ago
Project ID: N/A
Rasmus Lian
Rasmus Lian•2mo ago
N/A
Dane
Dane•2mo ago
This should be possible. What DNS provider are you using?
Rasmus Lian
Rasmus Lian•2mo ago
Sorry for the late reply. I'm using Namecheap. My SPF records are not working.
Dane
Dane•2mo ago
Are you using Namecheap's "Web Hosting DNS" (do you have cPanel?)
Rasmus Lian
Rasmus Lian•2mo ago
Yeah I use the "Advanced DNS"
Dane
Dane•2mo ago
EasyDMARC
How to Add SPF Record in Namecheap
An SPF protocol can increase your trustworthiness in receiving email servers. Here is a step-by-step guide on how to add your SPF record in Namecheap.
Rasmus Lian
Rasmus Lian•2mo ago
I have no issue adding SPF record, I have done that and it worked before I attached the CNAME record to Railway. However, the DNS spec states that, "if a CNAME record is present, no other data should be present" (https://serverfault.com/questions/834320/adding-both-cname-and-txt-dns-records-for-one-subdomain). Because of this, my emails fail the SPF check while the CNAME is active.
Server Fault
Adding both CNAME and TXT DNS records for one subdomain
I have a Heroku app and I need to set up a domain for it. The common way to set it up is to use CNAME record to specify that this domain is an alias to <your-domain-name>.herokuapp.com. The t...
Dane
Dane•2mo ago
You'll need to delete the CNAME record first
Rasmus Lian
Rasmus Lian•2mo ago
@dane.stevens Maybe, but I'm a bit hesitant since @Brody answered like this when asked the same question:
No description
Dane
Dane•2mo ago
ANAME is essentially a CNAME without the restrictions: https://dnsmadeeasy.com/post/what-is-an-aname-record
What is an ANAME Record? - DNS Made Easy Blog
ANAME record is a record that performs like a CNAME record but can be pointed at the root of a domain. Example: A record that’s been morphed into a CNAME.
Dane
Dane•2mo ago
you can always set up a second domain on railway, and point an ANAME to that to test it
Rasmus Lian
Rasmus Lian•2mo ago
What could be disadvantages of using ALIAS record then? If @Brody answered like that, must be some disadvantage no?
Want results from more Discord servers?
Add your server