Custom domain binding issue - 502 errors

aayoawoyemi
HOBBY

2 months ago

Service: Front End (front-end-production-393d)

Custom domains: court-share.com, www.court-share.com

Issue: Getting 502 Application failed to respond on custom domains

Default Railway domain works fine: front-end-production-393d.up.railway.app

Request ID: -KccfjUtRC-AbNxAezItjw,

Steps tried:

- DNS configured correctly in Cloudflare

- Domains show "Setup complete" in Railway

- Redeployed multiple times

- removed and readded domains multiple times on railway.

- Host header test still returns 502

is there a binding of some sort that can be cleared on railway end or am i missing something here

$10 Bounty

6 Replies

Railway
BOT

2 months ago

Hey there! We've found the following might help you get unblocked faster:

If you find the answer from one of these, please let us know by solving the thread!


2 months ago

Looks like you set this up as a redirect. You need to do this as a cert.

https://docs.railway.com/guides/public-networking#lets-encrypt-ssl-certificates


Status changed to Awaiting User Response Railway 2 months ago


ojovirtual
HOBBY

2 months ago

Make sure you add the port (usually 80) on the "Enter the port your app is listening on" field.


clashing
HOBBY

2 months ago


clashing

aayoawoyemim, you can check whether this helps you or not?https://station.railway.com/questions/dns-configuration-issue-for-custom-domai-10696e8a#fcrf

clashing
HOBBY

2 months ago

Did the previous reply helped, aayoawoyemi


jitmisra
HOBBY

2 months ago

The solution is to disable Cloudflare's proxy and use it for "DNS only," allowing traffic to go directly from the user to Railway's edge network, which is the intended setup.

  1. Log in to your Cloudflare dashboard.

  2. Select your domain, court-share.com.

  3. Go to the DNS section on the left-hand menu.

  4. Find the CNAME records for both www and court-share.com that point to Railway.

  5. Under the "Proxy status" column, click on the orange cloud to turn it off. It should turn grey and say "DNS only".

After you make this change, it may take a few minutes for the DNS to update. Once it does, your custom domains should load correctly. To answer your question directly, there is no binding that needs to be cleared on Railway's end; the configuration change is entirely within your Cloudflare settings.


Custom domain binding issue - 502 errors - Railway Help Station