Domain redirect issue

I pointed my custom domain (purchased through namecheap) to a front end project I have here at vercel. I’m pretty sure when I went through the options to set it up here on vercel, I chose www.example.com should redirect to example.com and that example.com should be preferred and what shows up in the address bar.

I added the A record and a CNAME record with ‘www’ on namecheap DNS. Now on vercel - it’s basically working, but it says www.example.com is set as main and example.com redirects to www.example.com.

I want to change this. Is that something I can change in settings here at vercel or should I delete the CNAME record at namecheap?

Any advice would be appreciated. Thank you!

Hey @hedkace

Here is the basic setup I follow, let me know if what you described is similar:

  • A record for the root domain (example.com)
  • CNAME record for the www subdomain
  • Vercel project should have BOTH domains attached ([your project] → Settings → Domains)
  • www should be redirecting (in vercel) to root domain (example.com)

Example shot of what Vercel settings for the project’s domain setup would look like

2 Likes

thank you @miguelcabs!

ah, I see. I didn’t realize I could just delete the redirect to “set it” as main. I was think there was a button somewhere that might say explicitly that. I was able to make those changes here in vercel. Looks like that worked. Thank you again!

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