phoebus
phoebus

Reputation: 1333

Railway service deployment to root domain

I have a nextjs app that I have deployed on Railways. My domain that I bought (let's call it myapp.com) is on GoDaddy. I want to map the railway service to my root domain, so to myapp.com. When I add a custom domain in the service settings on railway, it shows me to add CNAME record on GoDaddy with a @ as the name. That's not allowed on GoDaddy though. I also tried adding "www.myapp.com" instead on railway, but then it shows a warning Incorrect value "myapp.com". Can somebody help?

Upvotes: 0

Views: 22

Answers (1)

Kai Brooks
Kai Brooks

Reputation: 11

To set up your domain, you’ll need to use an A Record for the root domain because GoDaddy doesn’t allow CNAMEs for the root (@). In your GoDaddy DNS settings, add an A Record with the name @ and point it to Railway's IP address, which you can find in their settings or documentation. This connects your root domain (myapp.com) directly to Railway.

For www.myapp.com, you’ll use a CNAME since subdomains can have CNAMEs. Add a CNAME record with www as the name and myapp.com as the value. This makes www.myapp.com point to the same place as the root domain.

Upvotes: 0

Related Questions