How to Make Your Domain Without “www” the Default on Vercel
Prefer a cleaner website URL without the extra www? You can make your root domain the default on Vercel and automatically redirect visitors who use the www version.
Here’s how to set it up.
Step 1: Open your domain settings
Log in to Vercel, select your website project, then go to Settings → Domains.
Make sure both versions of your domain are listed:
yourdomain.comwww.yourdomain.com
Step 2: Connect your root domain to Production
Click Edit next to yourdomain.com.
Select Connect to an environment, choose Production, and save.
This makes the version without www serve your website directly.
Step 3: Redirect www to your root domain
Now edit www.yourdomain.com.
- Select Redirect to Another Domain.
- Choose 308 Permanent Redirect.
- Set the destination to
yourdomain.com, withoutwww. - Click Save.
Keep both domains connected to your Vercel project so visitors can reach your site either way.
Step 4: Test both URLs
Open both versions in your browser:
https://yourdomain.com— your website should open normally.https://www.yourdomain.com— it should redirect to the version withoutwww.
Replace the example domain with your actual domain when following these steps.
One last thing
Vercel often recommends using www as the primary domain, but you can choose the root domain if that's the URL you prefer. The important thing is to use one consistent version across your website.
For more details, check Vercel’s official domain redirection guide.
Good information should help you ask better questions, not stop asking them.