R
Railway14mo ago
ryanpzr

I need help to add a custom domain

I use Hostinger
59 Replies
Percy
Percy14mo ago
Project ID: a9395b84-5fc0-471d-aade-9f1879cab0ce
ryanpzr
ryanpzrOP14mo ago
a9395b84-5fc0-471d-aade-9f1879cab0ce
Fragly
Fragly14mo ago
Just pop your custom domain in the deployment settings, it'll ask you to add a CNAME record in your DNS settings, and then you're done
ryanpzr
ryanpzrOP14mo ago
i dont know the TTL for my custom domain i need to add a TTL in Hostinger
Fragly
Fragly14mo ago
why do you need to add a TTL in hostinger?
ryanpzr
ryanpzrOP14mo ago
No description
Fragly
Fragly14mo ago
ooh, that's an A record, railway won't ask you to add those, but github will the TTL doesn't really matter tooo much anyway Railway will ask you to add a CNAME record
ryanpzr
ryanpzrOP14mo ago
Yes yes, this is only example... When i add a CNAME in hostinger, is added as an "ALIAS" I don't know if this is a problem
Fragly
Fragly14mo ago
Nah that's fine, a CNAME record is basically just an alias pointing towards a different domain
Brody
Brody14mo ago
no it's not
Fragly
Fragly14mo ago
<:mommy_confused:1023749002069540935> it's not?
ryanpzr
ryanpzrOP14mo ago
Can it take a while to be added?
Brody
Brody14mo ago
an alias record is not a substitute for a cname
Fragly
Fragly14mo ago
takes a few seconds normally but can take up to a few minutes to a possibly a few days
ryanpzr
ryanpzrOP14mo ago
Ok
Brody
Brody14mo ago
fragly they need to use cloudflare's nameservers, I'll leave the help up to you though
Fragly
Fragly14mo ago
Nah, I didn't mean to say it's the same as an alias record My bad, If I'm doing something wrong then feel free to correct me
Brody
Brody14mo ago
hostinger doesn't support root level cnames
ryanpzr
ryanpzrOP14mo ago
Can i send a screenshot for you? to my problem i need to delete the default CNAME?
Brody
Brody14mo ago
you need to use cloudflare's nameservers fragly, take over for me please
Fragly
Fragly14mo ago
ooh okay, my bad, I just assumed hostinger worked like any other hosting service
ryanpzr
ryanpzrOP14mo ago
i dont need to add a CNAME in Hostinger?
Fragly
Fragly14mo ago
If I understand correctly then you can't add a CNAME directly in hotinger so you'd need to do it through cloudflare's nameservers To do that, just go to cloudflare's website, set up an account add your domain in cloudflare, it'll then give you instructions on how to add the cloudflare nameservers to hostinger and then you should be able to add a cname record n cloudflare after setting it up in your DNS settings
ryanpzr
ryanpzrOP14mo ago
Ok, I will do this
Brody
Brody14mo ago
fragly, for future reference, I only know of 3 nameservers that support root level cnames. cloudflare, namecheap, dnsimple. anything other than those 3 and it's plenty safe to assume they need to use cloudflare
Fragly
Fragly14mo ago
thanks brody! I'll keep that in mind
Brody
Brody14mo ago
though all nameservers support cnames on subdomains, it's only a problem with cnames at the root and ryanpzr, you don't need to transfer the domain, you only need to use cloudflare's nameservers
ryanpzr
ryanpzrOP14mo ago
and I configure it directly in cloudflare's?
Fragly
Fragly14mo ago
Yea, you can do that here:
No description
ryanpzr
ryanpzrOP14mo ago
i see this error
No description
Brody
Brody14mo ago
please read the message carefully
ryanpzr
ryanpzrOP14mo ago
i can delete the default CNAME Ok "an A, AAAA, or CNAME record with that host already exist."
Brody
Brody14mo ago
yes, so delete it lol you will also need to make this change https://docs.railway.app/deploy/exposing-your-app#provider-specific-instructions
ryanpzr
ryanpzrOP14mo ago
I still can't access the domain
ryanpzr
ryanpzrOP14mo ago
No description
Brody
Brody14mo ago
send the domain please
ryanpzr
ryanpzrOP14mo ago
mammacarmela.com.br
Brody
Brody14mo ago
read this please
ryanpzr
ryanpzrOP14mo ago
I read and executed
ryanpzr
ryanpzrOP14mo ago
No description
Brody
Brody14mo ago
okay then please wait until railway generates an SSL cert for you
ryanpzr
ryanpzrOP14mo ago
Do I need to change something in DNS?
Brody
Brody14mo ago
don't think so, just be patient please but for good measure, show me the cloudflare dns settings please
ryanpzr
ryanpzrOP14mo ago
Ok
ryanpzr
ryanpzrOP14mo ago
No description
Brody
Brody14mo ago
like both me and fragly have told you, you can't use A values, you need to use a CNAME
ryanpzr
ryanpzrOP14mo ago
oooh okay bro, thank-you for the help! it worked out!
Brody
Brody14mo ago
show me the new dns settings?
ryanpzr
ryanpzrOP14mo ago
Yes
ryanpzr
ryanpzrOP14mo ago
No description
Brody
Brody14mo ago
show me the domains you have in railway now?
ryanpzr
ryanpzrOP14mo ago
only this
Brody
Brody14mo ago
you would need to add the www subdomain to railway as well, otherwise you will get SSL errors for that too
ryanpzr
ryanpzrOP14mo ago
Thanks, I'll add
ryanpzr
ryanpzrOP14mo ago
No description
ryanpzr
ryanpzrOP14mo ago
that way?
Brody
Brody14mo ago
yep!
ryanpzr
ryanpzrOP14mo ago
Thanks bro!
Brody
Brody14mo ago
no problem
Want results from more Discord servers?
Add your server