Root custom domain doesn't work but www subdomain works

Hi everyone, I have this really strange problem where the www domain of my custom domain seems to be detected currently, but the root domain itself failed to get detected properly by Railway. I use namecheap as my registrar and I have pointed out the NS to Cloudflare. On Cloudflare, I have added 2 following CNAME entries: 1. @ pointing to dqwzg54u.up.railway.app 2. www pointing to q5tjbvkq.up.railway.app There's also a warning for the CNAME @ entry on Cloudflare: "CNAME records normally can not be on the zone apex. We use CNAME flattening to make it possible. Learn more." Any helps would be appreciated. Thanks!
No description
Solution:
Shall I just wait longer?
Jump to solution
30 Replies
Percy
Percy4mo ago
Project ID: a764e147-c28b-4388-85d2-547de92d2fd0
Celengan Babi
Celengan Babi4mo ago
a764e147-c28b-4388-85d2-547de92d2fd0
Brody
Brody4mo ago
show me the dns setup in cloudflare please
Celengan Babi
Celengan Babi4mo ago
No description
Celengan Babi
Celengan Babi4mo ago
I have additional DNS entries for email configs, but the 2 CNAME entries suggested by Railway are added already
Brody
Brody4mo ago
how long has it been waiting for dns updates?
Celengan Babi
Celengan Babi4mo ago
I've waited for less than an hour
No description
Solution
Celengan Babi
Celengan Babi4mo ago
Shall I just wait longer?
Brody
Brody4mo ago
yes please
Celengan Babi
Celengan Babi4mo ago
Thank you. I will wait for now. Do you know how long does it normally take until the domain gets detected by Railway? When I added the www subdomain, it was detected in less than a minute So I was wondering if I had done something wrong
Brody
Brody4mo ago
you can always remove the domain from railway and add it back, no need to change any dns
Celengan Babi
Celengan Babi4mo ago
I just tried to remove it and add it back again. I will wait for now and let's see if the propragation may take longer this time.
Celengan Babi
Celengan Babi4mo ago
An update to this: Seems like Railway is able to resolved the root CNAME DNS entry now. But I don't get why the DNS propagation tool like whatsmydns still couldn't resolve the CNAME entry as shown in below screenshot.
No description
Celengan Babi
Celengan Babi4mo ago
How does Railway fetch the root CNAME DNS entry? And why does the other tool like whatsmydns (and other DNS propagation checker tools) couldn't seem to pick that DNS entry? I can still access my website but I am not sure now if the traffic really goes thru.
Brody
Brody4mo ago
what's the status of your domain in railway now
Celengan Babi
Celengan Babi4mo ago
it's green. both the root domain and the www subdomain as well
No description
Brody
Brody4mo ago
and they both work for you?
Celengan Babi
Celengan Babi4mo ago
I just don't get why other DNS propagation tools couldn't still pick the root domain until now. yes they both seem to work for me
Brody
Brody4mo ago
odd, but problem solved, just needed to wait some
Celengan Babi
Celengan Babi4mo ago
yeah this is odd. because the CNAME root entry should be pointing to the URL that is given by Railways. I've tried maybe 3 DNS propagation tools but they all failed to do that somehow.
Brody
Brody4mo ago
it would be an IP address that cloudflare updates periodically
Celengan Babi
Celengan Babi4mo ago
ah would it make sense then that the root CNAME can only be detected by using A entry on DNS? afaik CNAME couldn't point to an IP address, right?
Brody
Brody4mo ago
there is no root cname, that's not possible, cloudflare flattenes it
Celengan Babi
Celengan Babi4mo ago
I'm not sure what iit's called technically, but the one with an "@"
Brody
Brody4mo ago
it shows as a cname on cloudflare's DNS settings, but to any dns resolver it would be an A record
Celengan Babi
Celengan Babi4mo ago
ah that makes sense so maybe other tools do not understand that "root" CNAME
Brody
Brody4mo ago
there is no root cname you would need to look for an A record of the correct value
Celengan Babi
Celengan Babi4mo ago
if I perform A record lookup for my domain, it seems fine (despite some missing results which may be caused by unfinished propagation)
No description
Celengan Babi
Celengan Babi4mo ago
thank you very much @Brody. I learn something new today
Brody
Brody4mo ago
no problem!