9 months ago
We're running 13+ projects on Railway with Cloudflare (Proxied mode). Each project has 3 custom domains on the same service:
example.com → CNAME → abc123.up.railway.app (Proxied)
adm.example.com → CNAME → abc123.up.railway.app (Proxied) ← same target
ptn.example.com → CNAME → abc123.up.railway.app (Proxied) ← same target
All domains are registered via customDomainCreate. The API returns a different requiredValue for each subdomain, but since Cloudflare Proxy forwards the
Host header, routing works correctly with the shared root CNAME target.
Issue 1: Subdomain status
This setup worked fine for over a month. However, subdomain statuses always show REQUIRES_UPDATE while the root domain shows PROPAGATED. Is this
expected with Cloudflare Proxied mode, or does it indicate a real problem?
Issue 2: TXT verification records
At one point, we experienced "Application not found" errors on subdomains. We suspected TXT verification records (like _railway-verify) might be
required, similar to other hosting providers. However, when we query the customDomainCreate mutation response and dnsRecords, the API only returns CNAME
records with DNS_RECORD_PURPOSE_TRAFFIC_ROUTE — no TXT records are ever returned.
We confirmed via schema introspection that DNS_RECORD_TYPE_TXT exists in the enum, and DNS_RECORD_PURPOSE_ACME_DNS01_CHALLENGE is a valid purpose, but
neither appears in actual API responses for our domains.
Questions:
1. Does Railway require any TXT verification records for custom domains? If so, why aren't they returned by the API?
2. Is it supported to use the root domain's CNAME target for all subdomains under Cloudflare Proxied mode?
3. Is the persistent REQUIRES_UPDATE status on proxied subdomains a known behavior or a real issue we need to address?
Thanks!
3 Replies
9 months ago
This thread has been marked as public for community involvement, as it does not contain any sensitive or personal information. Any further activity in this thread will be visible to everyone.
Status changed to Open Railway • 9 months ago
9 months ago
1.Traffic routing is CNAME based, but railway may additionally require _railway-verify TXT for domain ownership verification depending on the domain’s verification state/flow
2.Yes, supported**.** Multiple hostnames (root + subdomains) can point to the same *.up.railway.app target. railway routes based on the hostheader, and cloudflare proxy preserves/forwards it.
3.With Cloudflare Proxied enabled, this status is often expected because railway’s checker can’t reliably confirm the underlying CNAME (Cloudflare answers with its own edge IPs / hides the origin). So the UI may stay REQUIRES_UPDATE or fluctuate even while requests route correctly. Treat it as a real issue only if you see symptoms like SSL not issuing/renewing or “Application not found” in that case, temporarily switching the record to gray-cloud (DNS-only) to let Railway validate/issue certs, then turning proxy back on, typically resolves it.
a month ago
Hi there!
Your configuration of pointing multiple subdomains to the same root CNAME target behind Cloudflare's proxy is fully supported. Because Cloudflare preserves and forwards the original incoming Host header, Railway's edge router successfully directs requests to the correct project service.
Here are the direct answers to your questions based on platform behavior:
- Why are TXT verification records missing from the API?
Railway uses _railway-verify TXT records for initial domain ownership validation. Once a custom domain passes its initial validation check and binds successfully, Railway's API transitions to returning only traffic route CNAME records (DNS_RECORD_PURPOSE_TRAFFIC_ROUTE). Ownership challenge TXT records are omitted from standard API mutation responses once the domain is active.
- Is sharing the root CNAME target across subdomains supported?
Yes. Multiple subdomains can safely point to the same *.up.railway.app target. Railway performs virtual hosting routing based on the incoming Host header provided by Cloudflare's proxy layer.
- Is the persistent REQUIRES_UPDATE status expected with Cloudflare Proxied mode?
Yes, this is a known cosmetic artifact. When Cloudflare Proxy is enabled (orange cloud), Cloudflare masks your DNS records behind its own edge IPs rather than exposing Railway's target CNAME to public DNS resolvers. Because Railway's internal domain health checker relies on public DNS resolution to confirm the CNAME target, the dashboard status frequently displays REQUIRES_UPDATE even though traffic and routing function perfectly.
When to treat it as an issue: As long as your site loads correctly and SSL certificates renew without error, you can safely ignore REQUIRES_UPDATE. If you notice SSL provisioning failures or "Application not found" errors, temporarily toggle the Cloudflare record from Proxied (Orange Cloud) to DNS Only (Grey Cloud) for a few minutes to let Railway's validator successfully verify the domain and issue certificates, then switch it back to Proxied.
Official References
Railway Docs: Custom Domains & DNS Configuration
Cloudflare Docs: CNAME Flattening and Proxy Behavior
Disclosure: I used AI assistance to help prepare this response and reviewed the technical reasoning before submitting.
a month ago
The API separates the routing record from ownership verification: check status.dnsRecords for the CNAME and status.verificationToken for the TXT value. Railway's docs say both records are required, so a missing TXT in dnsRecords alone doesn't mean verification is unnecessary.
For each custom domain, use the CNAME value Railway shows for that domain. Cloudflare's proxy can hide the origin CNAME in public DNS lookups; check the records in Cloudflare itself. If verification or certificate issuance is stuck, temporarily switch the record to DNS Only while Railway validates it, then re-enable the proxy. Railway also documents its Cloudflare requirements and the separate API verification token.