a month ago
Hello, I originally used a custom-generated domain and hard-coded it directly in my frontend code (API endpoints, assets, etc.). My app has grown popular with many active users. Now I would like to move to a domain I personally own, but I'm concerned that changing the hardcoded domain will disrupt the experience for all existing users.
Could you please advise on the best way to transition to my own domain without breaking the app for current users?
Pinned Solution
a month ago
1) Add the custom domain alongside your pregenerated domain
2) Add the DNS records to your DNS provider (I recommend using Cloudflare)
3) Push the fix to your code to update the domain (I think you can use RAILWAY_PUBLIC_DOMAIN but I'm not too sure if that works with custom domains, but try it out in a staging environment)
4) Once the fix has been deployed, go to your Railway dashboard and remove the pregenerated domain
1 Replies
a month ago
1) Add the custom domain alongside your pregenerated domain
2) Add the DNS records to your DNS provider (I recommend using Cloudflare)
3) Push the fix to your code to update the domain (I think you can use RAILWAY_PUBLIC_DOMAIN but I'm not too sure if that works with custom domains, but try it out in a staging environment)
4) Once the fix has been deployed, go to your Railway dashboard and remove the pregenerated domain
Status changed to Solved brody • about 1 month ago