a month ago
Hi Railway team,
I'm a customer running a static site service on Railway. When I attach a root domain (example.com, not www) as a custom domain, both the dashboard and railway domain status give a single instruction: create a CNAME record at @ pointing to <hash>.up.railway.app.
That instruction cannot be followed on a standards-compliant DNS zone. RFC 1034 §3.6.2 and RFC 2181 §10.1 are explicit that a CNAME may not coexist with other records at the same owner name, and a zone apex must carry SOA and NS records. A CNAME at @ is therefore invalid by construction — this is not a limitation peculiar to one DNS provider.
The common workarounds — ALIAS/ANAME records, or CNAME flattening — are proprietary vendor extensions rather than part of the DNS specification. The IETF work in this area (draft-ietf-dnsop-aname) expired without becoming an RFC, so there is no standardized behavior that a DNS provider is obliged to implement, and none that Railway can assume its customers have.
Could you clarify the supported path for apex domains?
- Does Railway publish stable A/AAAA addresses (or an anycast range) that customers can point apex records at? If not, is that on the roadmap?
- Does Railway's edge support HTTPS/SVCB resource records (RFC 9460)? That is the standards-track mechanism for precisely this problem, and would let apex domains work without vendor-specific extensions.
- If the CNAME-at-apex instruction presumes the customer's DNS provider implements flattening, could the docs and the CLI/dashboard output state that explicitly, along with the recommended alternative for providers that do not?
- In the meantime, is redirecting the apex to
www— withwwwas a CNAME to Railway — the configuration you recommend and support?
I'd rather configure this the way you intend than guess at it. Thanks for taking a look.
Best regards,
Victor
1 Replies
a month ago
This thread has been opened as a bounty so the community can help solve it.
Status changed to Open Railway • about 1 month ago
a month ago
It is recommended by Railway docs, in this case to use a provider that supports CNAME flattening like cloudflare, you need to use their nameservers. Or you can redirect the root domain to www like you suggested.
You can read more about this here: https://docs.railway.com/networking/domains/working-with-domains#adding-a-root-domain