Additional DNS records on same domain as a Railway application
Hi! I am hosting a landing page on Railway with a custom domain using a CNAME record.
Now, I am also setting up an email client via Namecheap (their PrivateEmail service). To send emails from @mydomain.com, I have to add an MX record and a TXT record (SPF).
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.
I have tried removing the CNAME record, which makes the SPF succeed...
This seems like a very common usecase - am I missing something?
Do I somehow not have to set up MX/TXT records on the root domain (host: @) to succeed SPF check while sending emails from myuser@mydomain.com?
Thanks!
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...
3 Replies
Project ID:
N/A
No search results found.
⚠️ experimental feature
N/A
Or can I somehow add DNS records to the
(project).up.railway.app
domain?
I ended up solving working around this issue by...
1) Using www.example.com as the Railway app domain instead of example.com
2) Switching to CloudFlare's DNS solution and using their Page Rules to redirect non-www to www (via a proxied A record pointing at any address)
That way I could keep my SPF records on the root domain.
---
Would still be nice to know if I missed a better way to solve it? Thanks!
Hope everyone has an awesome weekend 🥳