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
Percy10mo ago
Project ID: a764e147-c28b-4388-85d2-547de92d2fd0
Celengan Babi
Celengan BabiOP10mo ago
a764e147-c28b-4388-85d2-547de92d2fd0
Brody
Brody10mo ago
show me the dns setup in cloudflare please
Celengan Babi
Celengan BabiOP10mo ago
No description
Celengan Babi
Celengan BabiOP10mo ago
I have additional DNS entries for email configs, but the 2 CNAME entries suggested by Railway are added already
Brody
Brody10mo ago
how long has it been waiting for dns updates?
Celengan Babi
Celengan BabiOP10mo ago
I've waited for less than an hour
No description
Solution
Celengan Babi
Celengan Babi10mo ago
Shall I just wait longer?
Brody
Brody10mo ago
yes please
Celengan Babi
Celengan BabiOP10mo 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
Brody10mo ago
you can always remove the domain from railway and add it back, no need to change any dns
Celengan Babi
Celengan BabiOP10mo 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 BabiOP10mo 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 BabiOP10mo 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
Brody10mo ago
what's the status of your domain in railway now
Celengan Babi
Celengan BabiOP10mo ago
it's green. both the root domain and the www subdomain as well
No description
Brody
Brody10mo ago
and they both work for you?
Celengan Babi
Celengan BabiOP10mo 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
Brody10mo ago
odd, but problem solved, just needed to wait some
Celengan Babi
Celengan BabiOP10mo 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
Brody10mo ago
it would be an IP address that cloudflare updates periodically
Celengan Babi
Celengan BabiOP10mo 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
Brody10mo ago
there is no root cname, that's not possible, cloudflare flattenes it
Celengan Babi
Celengan BabiOP10mo ago
I'm not sure what iit's called technically, but the one with an "@"
Brody
Brody10mo 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 BabiOP10mo ago
ah that makes sense so maybe other tools do not understand that "root" CNAME
Brody
Brody10mo ago
there is no root cname you would need to look for an A record of the correct value
Celengan Babi
Celengan BabiOP10mo 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 BabiOP10mo ago
thank you very much @Brody. I learn something new today
Brody
Brody10mo ago
no problem!
Want results from more Discord servers?
Add your server