DNS_PROBE_FINISHED_NXDOMAIN
kaiss-spinmed
HOBBYOP

2 years ago

I created a custom domain and other subdomains on 2 environments on railway (staging and production) and added all 3 CNAMES to Cloudflare with Proxy On and Full Mode.

The subdomains worked like a charm but the root domain (@ on CNAME) doesn't work. On Cloudflare there is a little info icon next to it saying: "CNAME records normally can not be on the zone apex. We use CNAME flattening to make it possible." and when I visit the website I see DNS_PROBE_FINISHED_NXDOMAIN

Solved

10 Replies

2 years ago

Please send the domain in question.


kaiss-spinmed
HOBBYOP

2 years ago

spinmed.ai

I made it work but only a CNAME redirecting to the custom domain (instead of adding a custom domain on railway)


2 years ago

You would want to add that domain to your Railway service and then add the given CNAME to Cloudflare.


kaiss-spinmed
HOBBYOP

2 years ago

That it what I did initially and it did not want to work. I waited for 2 or 3 hours and it still gave me the same error. I then removed the domain and just created a CNAME to the actual railway domain I had already for the project, waited for like an hour and it finally worked.


2 years ago

I would recommend doing it the correct way, otherwise we can't guarantee your domain will work long term.


kaiss-spinmed
HOBBYOP

2 years ago

But the correct way doesn't work. I also checked other accounts I have on railway using old projects and realized I also used this method to get the apex domain to work.


2 years ago

It does, if it doesn't it would mean you are doing something slightly wrong.


kaiss-spinmed
HOBBYOP

2 years ago

The steps are the following:

1- Add a custom domain

2- Copy the CNAME record from the popup that shows

3- Go to Cloudflare

4- Add the record.

How slightly can we be wrong?

Other relevant detail: Having the SSL mode as Full or Full Strict (tried both)


2 years ago

At a high level those are indeed the steps, but there is lots of places to go wrong.


kaiss-spinmed
HOBBYOP

2 years ago

Such as?


Welcome!

Sign in to your Railway account to join the conversation.

Loading...