Can not add CNAME with @ name to DNS record

I have my app hosted on railway, I am finding it impossible to add the DNS record from railway in other to point my domain I got from vercel to my app. Railway provided the record that looks something like this: “@” - CNAME - dfbx9kxe.up.railway.app, I get an error message in vercel domain record form saying: “Please specify a name or use an ALIAS Record instead, if you’re attempting to set a CNAME value for the apex domain.”

Hello,

Instead of using @ as name, you can keep the field blank (which does the same job) to add DNS records.

@swarnava, thanks for replying.
I forgot to mention that the field doesn’t take blank input, It shows this same message when I try to leave it blank: “Please specify a name or use an ALIAS Record instead, if you’re attempting to set a CNAME value for the apex domain.”

I think you need to set it on your www instead of the apex domain

1 Like

@neversitdull I have a setup for my www already which is working fine, but visitors will need to enter the www. before being directed my site which is not a good experience. I want visitors to be directed to my site even by typing mysitename.com, but currently this doesn’t work.

If I’m understanding correctly, it should look something like:

For www.yourdomain.com:

Type: CNAME
Name: www
Value: your-railway-app-url

For yourdomain.com (apex domain):

Type: ALIAS
Name: @ (or leave empty) 
Value: your-railway-app-url

ALIAS records are specifically designed to handle apex domain redirects, while CNAME records cannot be used at the apex domain due to DNS specifications.

Does that help?

1 Like

@pawlean, you are correct.
I was able to add the row to the domain record in vercel, now am going to wait for it to propagate.
I appreciate your help.

1 Like

Keep us updated! :pray:

It might be too soon for this meme, but I had to share:

1 Like

@pawlean, Lol.
DNS strikes again! Guess we’re back to square one, zero days and counting! :joy:

It’s working perfectly now, thank you!

2 Likes

So glad that worked out for you :smiley: See you around the community!

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.