S.
  • Services
  • For you
  • Solutions
  • Work
  • About
  • Know-how
  • Blog
Start a project
EN/PL/RU
  • Services01
  • For you02
  • Solutions03
  • Work04
  • About05
  • Know-how06
  • Blog07
Start a project
EN/PL/RU
Vlad Sedenko
Independent web product developer
EU / Poland / Warsaw
Products
  • NextWooNext.js storefront for WooCommerce
© 2026. All rights reserved
Services
  • Product Discovery
  • UX/UI Design
  • MVP Development
  • SaaS Development
  • Website Redesign
  • Web Application Security
  • Conversion Optimization
  • API Integrations & Business Automation
  • Product Support
Explore
  • Services
  • For you
  • Work
  • Solutions
  • About
  • Blog
  • Know-how
  • Contact
Start a project
  • vlad@sedenko.net
  • LinkedIn
  • Privacy/Cookies
Know-how/Next.js SEO Checklist: The Complete Guide for App Router (2026)

Part 9 of 22

Redirects, 404s and status codes

Redirects and status codes in Next.js: 308 vs 307, permanentRedirect, real 404s with notFound(), and keeping the index free of chains and soft 404s.

2026-07-15
Redirects, 404s and status codes
All topics in this guide
  1. 01Rendering strategy: what does the crawler actually see?
  2. 02Metadata API: titles, descriptions and the template pattern
  3. 03Canonical URLs and hreflang: one page, one address
  4. 04Open Graph and dynamic OG images
  5. 05sitemap.ts and robots.ts: file conventions instead of hand-written XML
  6. 06Structured data: JSON-LD that earns rich results
  7. 07Images, fonts and scripts: the classic performance trio
  8. 08Core Web Vitals: the three numbers Google measures
  9. 09Redirects, 404s and status codes
  10. 10Caching and content freshness
  11. 11AEO/GEO: getting cited by ChatGPT, Perplexity and Google AI Overviews
  12. 12Monitoring: SEO is a loop, not a launch task
  13. 13Trust and E-E-A-T: making your site believable
  14. 14Image SEO: turning pictures into traffic
  15. 15Internal linking and site architecture
  16. 16Search intent: pages that match what people actually type
  17. 17Programmatic SEO in Next.js: pages at scale without the spam
  18. 18SEO migration: replatforming to Next.js without losing traffic
  19. 19Pagination and faceted navigation without index bloat
  20. 20Accessibility and SEO: one job, two rewards
  21. 21Content decay: refresh, consolidate or prune
  22. 22Off-page for developers: earning links without buying them

Search engines read HTTP status codes as instructions. Wrong codes leak link equity or keep dead pages indexed.

Permanent moves — in next.config.mjs (returns 308, treated like 301 by Google):

// next.config.mjs
export default {
  async redirects() {
    return [
      {
        source: "/old-blog/:slug",
        destination: "/blog/:slug",
        permanent: true,
      },
    ];
  },
};

In-app redirects — pick the function that matches the semantics:

import { redirect, permanentRedirect, notFound } from "next/navigation";

// 307 — temporary (login gates, A/B routing)
redirect("/login");

// 308 — permanent (slug changed, old URL should transfer authority)
permanentRedirect(`/blog/${post.newSlug}`);

// Real 404 with your not-found.tsx UI
if (!post) notFound();

Rules that keep the index clean:

  • No redirect chains: old → older → current wastes crawl budget and dilutes signals. Always redirect straight to the final URL.
  • Missing content returns 404, not a 200 "nothing found" page (a soft 404 — Google flags these in Search Console).
  • Pick one URL shape and enforce it: with or without trailing slash (trailingSlash in config), lowercase, no duplicate www/non-www (redirect at the edge/DNS level).
  • When you change a slug, add the redirect in the same PR — retroactive redirect archaeology never happens.

Replatforming? The full playbook — inventory, redirect map, parity checks and launch monitoring — is in SEO migration.

Checklist:

  • All legacy URLs 308/301-redirect directly to final destinations (no chains)
  • Custom not-found.tsx that genuinely returns 404
  • One canonical URL shape (slash, case, host) enforced globally
  • Slug changes always ship with their redirect
← PreviousCore Web Vitals: the three numbers Google measuresNext →Caching and content freshness

01—22

All topics in this guide

  1. 01Rendering strategy: what does the crawler actually see?→
  2. 02Metadata API: titles, descriptions and the template pattern→
  3. 03Canonical URLs and hreflang: one page, one address→
  4. 04Open Graph and dynamic OG images→
  5. 05sitemap.ts and robots.ts: file conventions instead of hand-written XML→
  6. 06Structured data: JSON-LD that earns rich results→
  7. 07Images, fonts and scripts: the classic performance trio→
  8. 08Core Web Vitals: the three numbers Google measures→
  9. 09Redirects, 404s and status codes•
  10. 10Caching and content freshness→
  11. 11AEO/GEO: getting cited by ChatGPT, Perplexity and Google AI Overviews→
  12. 12Monitoring: SEO is a loop, not a launch task→
  13. 13Trust and E-E-A-T: making your site believable→
  14. 14Image SEO: turning pictures into traffic→
  15. 15Internal linking and site architecture→
  16. 16Search intent: pages that match what people actually type→
  17. 17Programmatic SEO in Next.js: pages at scale without the spam→
  18. 18SEO migration: replatforming to Next.js without losing traffic→
  19. 19Pagination and faceted navigation without index bloat→
  20. 20Accessibility and SEO: one job, two rewards→
  21. 21Content decay: refresh, consolidate or prune→
  22. 22Off-page for developers: earning links without buying them→

Want this handled for you?

I audit and fix technical SEO on Next.js sites — indexing, performance, hreflang and AI visibility.

Technical SEO service