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.
Deploy hub
Open this when the build error is one symptom and the bigger problem is your production handoff and hosting workflow.
Open this next →
Cursor review
Open this when deploy pain is pushing you toward a more code-first workflow with tighter control.
Open this next →
Lovable reviews
Open this when production friction is making you reconsider the tradeoff between generation speed and later cleanup cost.
Open this next →
Tool picker
Open this when the deploy pain is making you question the stack itself and you want a faster next recommendation.
Open this next →
Firecrawl review
Open this when the deployment problem is part of a broader stack rethink that also includes data-fetching and agent workflows.
Open this next →
Quick Fix Summary
| Most likely cause | Both domains need to be added in Vercel, with one set as primary. |
| Fastest fix | Add both domains |
| Use this page if | www.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
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
My Domain Still Will Not Connect to Vercel
My Site Still Says Not Secure After Connecting the Domain
Lovable Pages Return 404 on Direct URL
Vercel Shows a Red X and the Deploy Never Goes Live
Works Locally but Vercel Says Environment Variables Are Undefined
Vercel API Route Works Locally but Times Out in Production