Custom Domain Issue

My custom domain works at www.domain.com, but not domain.com. I am setup on cloudflare name servers and have cname entries for @ and www. The www entry points to the root domain and the root domain entry points to the target provided by Railway, but for some reason I'm only able to access the site when including "www" in the URL. Otherwise I get a "nothing here...yet" railway error. Anyone else have this issue or know the workaround?
15 Replies
Percy
Percy13mo ago
Project ID: N/A
corgis_anonymous
corgis_anonymous13mo ago
N/A
Brody
Brody13mo ago
show me a screenshot of the cloudflare DNS settings please
corgis_anonymous
corgis_anonymous13mo ago
Brody
Brody13mo ago
now show me the domains in railway
corgis_anonymous
corgis_anonymous13mo ago
Brody
Brody13mo ago
you don't have the non www domain there?
corgis_anonymous
corgis_anonymous13mo ago
if I create a second domain it has a different cname target - the DNS can't have the root domain go to two different targets
Brody
Brody13mo ago
it doesn't need to??
corgis_anonymous
corgis_anonymous13mo ago
oh ok - just add the second domain and do nothing with the new DNS entry that pops up?
Brody
Brody13mo ago
well ideally you would have set the www subdomain to the cname record railway would have given you so do that too right now it's set to your root domain
corgis_anonymous
corgis_anonymous13mo ago
ok it works
corgis_anonymous
corgis_anonymous13mo ago
this is a valid setup?
corgis_anonymous
corgis_anonymous13mo ago
did not realize there could be more than 1 reference to the hosted app thank you
Brody
Brody13mo ago
as long as those are the correct records railway gave you for each entry, yes