Vercel·Fixdeploybeginner

www Not Redirecting to Non-www

Quick Answer

Both domains need to be added in Vercel, with one set as primary. Start with "Add both domains" before making broader code changes.

You're in the right place if...

  • !www.domain.com and domain.com show different things
  • !No redirect between www and non-www
  • !SEO split between two URLs

Why this happens

Both domains need to be added in Vercel, with one set as primary.

Fix

1

Add both domains

Vercel Dashboard → Project → Settings → Domains → Add both: domain.com AND www.domain.com → Set domain.com as primary. Vercel auto-redirects www to non-www.

Prevent this next time

Always add both www and non-www when setting up a domain. Set non-www as primary.

Frequently Asked Questions

Non-www (domain.com). It's shorter, cleaner, and the modern standard.

Yes. Without a redirect, Google sees two separate sites. The redirect consolidates all SEO to one URL.

Related fixes

Weekly Newsletter

Get next week's fix before you need it.

Join developers getting weekly vibe coding tips, error fixes, and tool updates.

Subscribe on Substack →