R
Railway6mo ago
x4zx

How can I connect my personal domain to the site?

I bought the domain netrix.fun from this site https://www.ukraine.com.ua/ and wanted to use it for my site, but there were some difficulties. I do not quite understand what and where to insert, I first time connecting the domain to the site, so I apologize in advance if I ask something stupid
No description
No description
No description
Solution:
that register does not support root level cnames, you will need to use cloudflare's nameservers. cloudflare has a guide for that here - https://developers.cloudflare.com/dns/zone-setups/full-setup/setup/...
Jump to solution
31 Replies
Percy
Percy6mo ago
Project ID: 49c5f0bc-621a-4388-8576-9a3edb59e080
Solution
Brody
Brody6mo ago
that register does not support root level cnames, you will need to use cloudflare's nameservers. cloudflare has a guide for that here - https://developers.cloudflare.com/dns/zone-setups/full-setup/setup/
x4zx
x4zxOP6mo ago
Do you know of any other site where you can buy a domain to use Railway data there?
Brody
Brody6mo ago
you dont need to buy a new domain, im not sure how you got that out of what i said, you simply need to use cloudflare's nameservers
x4zx
x4zxOP6mo ago
Got it, I'll try to figure it out. Thank you
Brody
Brody6mo ago
read cloudflare's guide
x4zx
x4zxOP6mo ago
I did everything according to the guide you gave, updating servernames for my domain on the registrar's site. Now I need to connect the data from railway to cloudflare?
No description
Brody
Brody6mo ago
I'm not sure where you got those IP addresses from but railway does not use IPs for anything, remove them and replace them with the CNAME you got from Railway
x4zx
x4zxOP6mo ago
so?
No description
Brody
Brody6mo ago
if that's the CNAME railway gave you, yep
x4zx
x4zxOP6mo ago
Yes, that's the data Railway gave me.
x4zx
x4zxOP6mo ago
No description
x4zx
x4zxOP6mo ago
Should it be something like this? Or will the status also change, for example to "Active"?
Brody
Brody6mo ago
you are using a cloudflare proxy so that status is correct within cloudflare go and set your SSL/TLS settings to "Full"
x4zx
x4zxOP6mo ago
done
Brody
Brody6mo ago
does it work?
x4zx
x4zxOP6mo ago
yea
No description
x4zx
x4zxOP6mo ago
thanks you
Brody
Brody6mo ago
no problem!
x4zx
x4zxOP6mo ago
I have another small question, how can I add subdomains?
Brody
Brody6mo ago
the same way you added the root domain
x4zx
x4zxOP6mo ago
Something like that?
No description
Brody
Brody6mo ago
not quite - Name refers to just the subdomain (or @ for the root) - that's the same target as you've used previously, you need to add another domain to your service to get another CNAME - you'll likely want to have the API subdomain on a different railway service
x4zx
x4zxOP6mo ago
Got it, I need that last point
x4zx
x4zxOP6mo ago
This requires bringing up another service or can be done like this:
No description
Brody
Brody6mo ago
yes, add another service to the project and deploy your backend, it would make no sense to have an api subdomain on the service that serves your frontend
x4zx
x4zxOP6mo ago
Yes, I understand that it needs to be connected to a servlet that provides the backend, but this is a test site, so I'd like to learn as much as possible
Brody
Brody6mo ago
test or not it would make no sense to have an api subdomain on the service that serves the frontend
x4zx
x4zxOP6mo ago
Just if the backend is on a different domain, but I want to have a subdomain, do I have to specify it in the Networking section or do I need a new service for each subdomain?
Brody
Brody6mo ago
you do not need a new service for each subdomain, but like I said it makes no sense to have the api subdomain on the service that serves your frontend, create another service for the backend and add the api subdomain to that service
x4zx
x4zxOP6mo ago
Yeah, that's what I meant. Thank you for explaining it so thoroughly :1010:
Want results from more Discord servers?
Add your server