Vercel·Fixdeploybeginner

www Not Redirecting to Non-www

Quick Answer

How do I fix www Not Redirecting to Non-www?

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

Fix signals

What this answers
Why www not redirecting to non-www happens and what to change first.
Fastest move
Add both domains
Use this page if
www.domain.com and domain.com show different things

If this keeps happening

Open the next decision, not just the patch

Use these when the current fix is helpful, but the real answer is a better tool choice, a cleaner workflow layer, or a more trustworthy launch path.

Quick Fix Summary

Most likely causeBoth domains need to be added in Vercel, with one set as primary.
Fastest fixAdd both domains
Use this page ifwww.domain.com and domain.com show different things

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