R
Railwayβ€’2y ago
CoCa

Custom Domain HTTPS TLS Cert invalid

Project ID: 81d08146-e275-403d-8a25-046edbf806f6 I have a domain purchased on Google Domains that I'd like to forward to my Railway deployment. I created two custom domains for this, one prefixed with www. and that worked fine with setting up a CNAME from Google Domains. The 2nd is the root domain itself, and I set up an A record in Google Domains with the IP address of the second custom domain (for the root domain) from Railway. This domain when accessed in the browser shows HTTPS TLS Cert invalid since it matches *.up.railway.app Is this something that takes a while to sync up? Did I do something incorrectly? (not confident about the A record approach, since I wasn't able to setup a CNAME for the root domain)
19 Replies
Percy
Percyβ€’2y ago
Project ID: 81d08146-e275-403d-8a25-046edbf806f6
Brody
Brodyβ€’2y ago
Did I do something incorrectly? (not confident about the A record approach, since I wasn't able to setup a CNAME for the root domain)
you need to use CNAME, using A type will break it, as you are experiencing you will need to use cloudflare's nameservers, here is a guide from them https://developers.cloudflare.com/dns/zone-setups/full-setup/setup/
CoCa
CoCaOPβ€’2y ago
Okay weird, it shows the correct cert domain name when I look on my phone. Ok thanks @Brody I'll take a look
Brody
Brodyβ€’2y ago
yeah i know, sometimes it can work, but railway does not support using A types, so it will be bound to break at some point if you need any help getting your custom domain setup on cloudflare, let me know i know you will have to remove all the A types from cloudflare after you make the switch, and re-add them as CNAME types
CoCa
CoCaOPβ€’2y ago
Okay, that was pretty simple, thanks! This is done now πŸ™‚ Well, the www prefixed domain doesn't resolve, but I don't think that's too big of an issue
Brody
Brodyβ€’2y ago
i can help with that
CoCa
CoCaOPβ€’2y ago
do you need any info from me?
Brody
Brodyβ€’2y ago
screenshot of the domains in your railway service, and a screenshot of the dns settings in cloudflare
CoCa
CoCaOPβ€’2y ago
CoCa
CoCaOPβ€’2y ago
Brody
Brodyβ€’2y ago
what are your ssl/tls settings in cloudflare?
CoCa
CoCaOPβ€’2y ago
under SSL/TLS overview it shows "Flexible" mode
Brody
Brodyβ€’2y ago
set to just Full
CoCa
CoCaOPβ€’2y ago
done
Brody
Brodyβ€’2y ago
now your app is returning 500
CoCa
CoCaOPβ€’2y ago
i'll keep trying but the www prefixed domain still isn't resolving
Brody
Brodyβ€’2y ago
thats normal, please wait for dns propagation
CoCa
CoCaOPβ€’2y ago
okay, sweet, this is expected. I still have to update CORS
Brody
Brodyβ€’2y ago
okay sounds good
Want results from more Discord servers?
Add your server