Wildcard Domain + Cloudflare
webdevtodayjason
PROOP

8 months ago

so here's the scenario I have a wildcard domain added inside a railway. I've added the two records required into Cloudflare, and my domain root domain is also added and pointed to the server so that it can work. My SSL certificate is set correctly to universal and I have it set to full not flexible. When I try flexible I get too many redirects any subdomain I try to connect to railway with I get the SSL handshake failed Error code 525. Now, if I go into railway and add a subdomain custom domain, I don't have to create the record in Cloudflare and this works, But this defeats the whole purpose of having a wild card domain and railway. Each client to the sass application will have their own host name at the domain for logging in and managing their clients. I'm at a loss at this point. I have been struggling with this since yesterday. I wish I could pay railway to help me lol this is critical for me and I don't know what else to do. Any help would be greatly appreciated. Thank you.

9 Replies

webdevtodayjason
PROOP

8 months ago

65ba07bf-6338-44f3-a04b-cc24fb2f1bff


8 months ago

Is there a chance you have stale ACME/TXT records?


8 months ago

I heard brody mentioning this


8 months ago

try dig +short TXT _acme-challenge.sub.yourdomain.com


8 months ago

What I found online to check for acme-challenge


webdevtodayjason
PROOP

8 months ago

I just removed the two records from CF and the custom domain from Raiway. I disabled the Universal SSL. Im waiting for 10 min then will re add.

If it is a stale txt record on CF I am hoping that this clears it out.


webdevtodayjason
PROOP

8 months ago

From this Post: https://station.railway.com/questions/wildcard-subdomain-setup-with-cloudflare-0fa5b30c

echohack:

OK! I found the issue. The acme challenge failed, unfortunately due to a Cloudflare issue (more info here: https://community.cloudflare.com/t/stale-dns-records-being-served-by-cloudflare/619916)

This is due to a stale txt record on Cloudflare's side. Here's what you can do:

1. Remove the wildcard domain from Cloudflare.
2. Remove the corresponding DNS from Cloudflare.
3. Turn off Universal SSL.
4. Wait 10 or so minutes.
5. Turn Universal SSL back on.
6. Add the domain back to Railway and finish the corresponding setup.

Sorry this is such a pain :(

webdevtodayjason
PROOP

8 months ago

I belive this fixed it!


8 months ago

Oh wonderful! Hope that I was able to help with it 😁


Loading...