14 days ago
I cant get my cname to be validated. In my environment Gocare.com website, I am pointing gocare.com over to my Wordpress site and it said to add a cname record. Can you help me fix this? I even did the 1 click DNS setup with CloudFlare from Railway but it still didn't work and when I go to gocare.com, it just redirects over to my docker-image-gocarecom-website.up.railway.app
2 Replies
14 days ago
This thread has been marked as public for community involvement, as it does not contain any sensitive or personal information. Any further activity in this thread will be visible to everyone.
Status changed to Open Railway • 14 days ago
14 days ago
Make sure you don't have any routing rules set for Gocare.com in your Cloudflare dashboard. Also, it may take up to a few hours (maybe even a day, but rarely), for Railway to validate the DNS and issue certificates for custom domains.
14 days ago
It's not a DNS or Railway problem — DNS is pointing to Railway correctly and the request is reaching the site. The redirect is coming from WordPress itself. You can see it in the response headers: x-redirect-by: WordPress.
WordPress forces every visitor to its configured "Site Address." Right now that's set to https://docker-image-gocarecom-website.up.railway.app/ instead of https://gocare.com, so WordPress bounces everyone to the Railway URL.
The fix is to set both URL settings to https://gocare.com. Easiest/most reliable way is to add these two lines to wp-config.php:
define( 'WP_HOME', 'https://gocare.com' );
define( 'WP_SITEURL', 'https://gocare.com' );
(Or update home and siteurl via WP-CLI / Settings → General if you prefer.)
One thing to check first: if there's a WP_HOME/WP_SITEURL environment variable on the Railway service pointing to the railway URL, update it there too — that overrides everything else. And make sure gocare.com is added as a custom domain on the Railway service.
After the change, flush any caches and re-save permalinks and it should load on gocare.com normally.