R
Railway10mo ago
Flint

Using a custom domain with cloudflare

hi! I'm ready to deploy my project to my domain, and now railway has detected my cname record, but isn't working yet https://cdn.fl1nt.dev/GAGE1/sukiDEli19.png I looked at the docs linked and it seems the only special instructions needed for cloudflare are if the domain im using is wildcard but its not, just base domain. any ideas what is wrong? checked my SSL settings as the doc says too and it is on full so no issues there. Thanks guys, and sorry if noob question.
46 Replies
Percy
Percy10mo ago
Project ID: 0d4077db-2291-4092-a0d4-30f321743c57
Flint
Flint10mo ago
0d4077db-2291-4092-a0d4-30f321743c57
Brody
Brody10mo ago
well what isn't working specifically?
Flint
Flint10mo ago
i think i figured out that it's because CNAME is being put on the root of the domain, adding www. is working, but is it possible to also get the root domain working? if not it doesnt really matter, www is fine
Brody
Brody10mo ago
cloudflare does support cnames at the root level so there should be no problems with that, something might be configured incorrectly, can you show me a screenshot of the domains you have in your service and your DNS setup in cloudflare please?
keithb0226
keithb022610mo ago
I have the same issue.
Let's say I own domain.com and am hosting on Hostgator where I can't add a CNAME with @. www.domain.com shows with green tick in Railway but domain.com shows "waiting for DNS update". DNS settings in Cloudflare: - Removes A record for domain.com - Added CNAME with domain.com pointing to mydomain.railway.app - Added CNAME with www.domain.com pointing to mydomain.railway.app Note: CNAME records are not proxied yet.
SSL/TLS in Cloudflare is set to Full. I set this up over 72 hours ago. The www.domain.com in Railway resolved in minutes. The domain.com in Railway is still waiting. Any idea what I could do to resolve this please? I assume it's the same issue.
Brody
Brody10mo ago
can you send the same stuff i asked flint for?
keithb0226
keithb022610mo ago
I have attached the relevant sections. I hope this is sufficient?
No description
No description
Brody
Brody10mo ago
is the censorship absolutely necessary? id like to be able to dig those domains
keithb0226
keithb022610mo ago
wuther.au
Brody
Brody10mo ago
hmmm thats very odd keith, the root domain is just an A value for a gcp ip and i even get that when querying cloudflares own dns resolvers
Flint
Flint10mo ago
i just disabled proxying, which is fine honestly
Brody
Brody10mo ago
they have it disabled already
keithb0226
keithb022610mo ago
Thanks Brody. I was going to host on GCP and may have set the A record accordingly. Actually it's not this. The A record IP address is my Hostgator account.
Brody
Brody10mo ago
but has disabling the proxy worked for you flint?
Flint
Flint10mo ago
yea connection still seems proxied despite that but whatever it works all that matters lmfao
Brody
Brody10mo ago
well railway has a router and proxy does Hostgator use the exact same gcp datacenter as railway? (us-west1) because that ip is a google ip
Flint
Flint10mo ago
connections didnt seem proxied when i was using a railway supplied domain but its besides the point. my issue is resolved.
keithb0226
keithb022610mo ago
I'm not sure but do recall that Hostgator uses GCP; just not sure which data centre.
Brody
Brody10mo ago
how long ago did you setup the dns in cloudflare?
keithb0226
keithb022610mo ago
About 40 hours ago.
Brody
Brody10mo ago
what does the little i say?
No description
keithb0226
keithb022610mo ago
CNAME records normally can not be on the zone apex. We use CNAME flattening to make it possible. Learn more.
Brody
Brody10mo ago
okay thats fine
keithb0226
keithb022610mo ago
I noticed when searching wuther.au in dig that clicking CNAME has "Record not found".
Brody
Brody10mo ago
yes thats the strange thing, its just an A record
keithb0226
keithb022610mo ago
There's no A record with that IP address in either Cloudflare or Hostgator DNS settings???
Brody
Brody10mo ago
i know i am stumped
Brody
Brody10mo ago
these are the same as the ones youve set in hostigator?
No description
keithb0226
keithb022610mo ago
The nameservers are set in my domain provider and yes, that's what I have set.
Brody
Brody10mo ago
i really dont know what to tell you at this point
keithb0226
keithb022610mo ago
I appreciate your help. Perhaps I just need to wait?
Brody
Brody10mo ago
it shouldn't really take 40 hours
keithb0226
keithb022610mo ago
I do have these messages in Cloudflare now...
Brody
Brody10mo ago
messages?
keithb0226
keithb022610mo ago
No description
Brody
Brody10mo ago
two checkmarks
keithb0226
keithb022610mo ago
Do the check marks mean it is done?
Brody
Brody10mo ago
it means youve completed that stuff in cloudflares dashboard
keithb0226
keithb022610mo ago
OK. Thanks.
Brody
Brody10mo ago
maybe the team can push through a ssl cert for you wanna open a new thread for that? if i flag the team here the information from the original post will get sent to them instead of yours
keithb0226
keithb022610mo ago
OK, will do. I'm new here so will do what I can...
Brody
Brody10mo ago
new post
No description
keithb0226
keithb022610mo ago
Thanks. It is done.
Brody
Brody10mo ago
give percy the project id please
keithb0226
keithb022610mo ago
Done.