DEV Community

Cover image for Next.js 14 www non-www redirects: GSC errors that won't die (and how I fixed them)
Victor Caña
Victor Caña

Posted on

Next.js 14 www non-www redirects: GSC errors that won't die (and how I fixed them)

Next.js 14 www → non-www redirects: GSC errors that won't die (and how I fixed them)

Switched from www.readytorelease.onlinereadytorelease.online.

Vercel 308 redirects = perfect.

Google Search Console: 4 “Crawled - currently not indexed” errors on WWW after 72h.

Here’s the fix that took me 3 days to figure out.


The problem

When you run:

curl -I https://www.readytorelease.online
Enter fullscreen mode Exit fullscreen mode

You get:

HTTP/2 308
location: https://readytorelease.online/
Enter fullscreen mode Exit fullscreen mode

Looks fine, right?

Permanent redirect in place, only one GSC property (readytorelease.online), and correct redirect logic in next.config.js.

But GSC still showed 4 “Crawled - currently not indexed” errors for www.readytorelease.online URLs.

Brand new ones (March 21–23).

Deleting the old property or hitting Validate Fix did nothing for days.

Root cause

Google caches WWW versions even after you stop serving them or delete the old property.

Those cached responses can persist 24–72 hours, confusing GSC into thinking redirects are broken.


The 3 fixes that actually worked

1. next.config.js redirect (already done, but critical)

// next.config.js
async redirects() {
  return [
    {
      source: '/:path*',
      has: [{ type: 'header', key: 'host', value: 'www.readytorelease.online' }],
      destination: 'https://readytorelease.online/:path*',
      permanent: true, // 301
    },
  ]
}
Enter fullscreen mode Exit fullscreen mode

This catches any request hitting the www. host and permanently redirects it to the root domain.


2. Google Search Console → Coverage cleanup

Go to Index → Pages → “Excluded”.

Filter all URLs containing "www.".

Click “Validate Fix” on all of them.

This tells Google to recrawl those URLs — usually within 24 hours — and refresh their redirect cache.


3. Aggressive URL Inspection

From GSC:

  1. Inspect https://www.readytorelease.online
  2. Hit “Test live URL” → confirm that 308 redirect responds correctly
  3. Then “Request indexing”

Even though it sounds redundant, this step forced Google to acknowledge the redirect and finally cleared the WWW errors.


Result (after 24 h)

✅ GSC shows “Validated” for all previous WWW URLs

✅ Coverage report is clean

+15% impressions on non-www URLs

✅ No more "Crawled - not indexed" ghosts


The key lesson

GSC caches redirects for 24–72 hours, even if your site returns perfect 301 or 308 responses.

If curl -I or fetch() show correct status codes, don’t panic over small (<10) errors.

But if they persist, use the Validate Fix + Test live URL combo to force Google’s refresh.


Conclusion

Vercel’s redirects are instant.

GSC’s understanding of them isn’t.

Sometimes the crawler is the real bottleneck.

Repo: readytorelease.online (Next.js 14 + Vercel)

Twitter: @shipwithvictor

🔍 Curious how I used AI to validate my market before launch?

Check out readytorelease.online — built with Next.js 14, Groq, and Supabase to automate market research for indie products.

Top comments (0)