How to fix “Redirect error” on Next.js
If Search Console shows “Redirect error” on your Next.js site, you are in the right place. The redirect loops or the chain is too long. This page covers the causes and a step-by-step fix for Next.js. A React framework. Server-side and static generation hand Googlebot ready-made HTML; metadata is managed with the Metadata API.
Contents
What does this status mean?
Google could not follow the redirect to the end: a loop, a very long chain, or an empty or overly long target address. The page cannot be indexed.
Likely causes on Next.js
- http/https or www rules redirect into each other endlessly.
- Plugin and .htaccess redirects conflict.
- Several migrations left old URLs forming a chain.
- The redirect target is generated empty or malformed.
- Next.js note: Define permanent (permanent: true) redirects with redirects() in next.config.js and avoid chains and loops. On missing routes return a real 404 with notFound().
Step-by-step fix on Next.js
- In your Next.js admin go to: The metadata object in app/layout.tsx and page files, app/robots.ts, app/sitemap.ts and next.config.js.
- Define permanent (permanent: true) redirects with redirects() in next.config.js and avoid chains and loops. On missing routes return a real 404 with notFound().
- Trace the URL with a redirect checker or curl -IL and find the loop.
- Remove conflicting rules; define the domain rule in one place only (server or CDN).
- Shorten chains: each old URL should 301 directly to the final one.
- Verify the target address is absolute and valid.
- After fixing, start validation and resend the URL.
Extra checks for Next.js
- sitemap: Generate a dynamic sitemap with app/sitemap.ts; split large sites with generateSitemaps. List only canonical URLs that return 200.
- speed and crawling: Render pages statically or with ISR where possible, split heavy client bundles and use next/image. Slow server responses reduce crawl rate.
After fixing
In Search Console start "Validate fix" for this status and resubmit the page with URL inspection. First confirm the blocker is gone with the free Free indexability checker tool; for many URLs follow Bulk URL indexing: how to send thousands of pages to Google. Google makes the indexing decision itself and timing ranges from days to weeks.
More information
Frequently asked questions
How long a chain is a problem?
Google follows only a few hops. One hop is best.
Can cookies cause a loop?
Yes; redirects that need cookies can become loops for Googlebot. Make redirects work without cookies.
Where are these settings on Next.js?
The metadata object in app/layout.tsx and page files, app/robots.ts, app/sitemap.ts and next.config.js.