Updating DNS Records

Hello, I currently have my DNS records pointing directly to my Next.js application. I now want to update my records to point to a Caddy proxy.

Ideally I'd like to make the DNS switch with 0 downtime, but I can't have "mydomain.com" on both the Next.js and Caddy application in Railway.

Is there a recommended approach for achieving this on Railway?

Solved

9 Replies

b7ffa58d-4fc3-417f-8ad8-ffc29078d847


a year ago

how to make a DNS switch with no downtime? don't switch DNS in the first place!

you currently have a service running NextJS with the custom domain, so simply deploy the caddy application into that same NextJS service, provided you set everything else up correctly, there's going to be no downtime.


Hmm, I'd prefer to keep Caddy as a separate service.

I have an approach, but I just wanted to check if there was something simpler. Thanks for the reply though! 🙂


a year ago

you would keep them as separate services, you misunderstood, but glad you came up with your own solution


Ahhhh, I did misunderstand - your approach makes sense if I'm understanding you correctly: So you're saying duplicate the Next service, and then replace the original one (which has the custom domain) with the Caddy proxy?


a year ago

yep!


Ah amazing! Thanks Brody 🙂


a year ago

no problem


a year ago

!s


Status changed to Solved brody over 1 year ago


Loading...