SEO

How to Audit Technical SEO for a Next.js Website

An advanced checklist for engineers and SEO professionals to diagnose rendering, metadata, sitemap, and performance issues in the Next.js App Router and Pages Router ecosystem.

Cover image for the article: How to Audit Technical SEO for a Next.js Website

Executive brief

Key takeaways

  • In the App Router, the excessive use of `'use client'` destroys the purpose of SSR on content pages, delaying Googlebot's read.
  • The Metadata API (`generateMetadata`) must be audited to ensure Canonical, Open Graph, and Title tags are statically injected.
  • Dynamic routes (`[id]`) without `generateStaticParams` force the server to render on-demand, elevating TTFB.
  • Errors like not using the Next `<Link>` component break route prefetching and affect internal Crawl Budget.

When Vercel popularized Next.js as the definitive React framework, the promise was clear: the end of the SEO problems faced by Single Page Applications (SPAs). With Server-Side Rendering (SSR) and Static Site Generation (SSG), Googlebot would finally see the complete HTML.

However, the operational reality in 2026 is much darker. Among the most common errors in React and Next.js, the false security that "the framework takes care of SEO" has spawned an epidemic of sites that are blazing fast on the developer's machine, but slow, unindexable, and financially inefficient in production.

To audit a site driven by evidence, dropping the URL into Lighthouse is not enough. If you are evaluating a Next.js E-commerce or SaaS platform, you need to debug the architecture. This technical guide details the hidden gears of Next.js (focusing on the App Router) that dictate your organic success.


1. The Rendering Prism: SSR, SSG, and Client Components

The first rule for investigating whether JavaScript is affecting rendering and SEO in Next.js is to analyze the boundary between Server and Client.

In the new App Router model, everything is a Server Component by default. This is perfect for SEO. The HTML is generated on the server, without sending the corresponding JavaScript to the browser.

The SEO leak happens when developers inject the 'use client' directive at the top of primary layout components just to use a useState or a click event.

How to Audit:

  1. Review the component tree (Layout.tsx and page.tsx).
  2. If the main product page (the storefront) is forced as 'use client', all the content and internal links inside it will depend on hydration.
  3. The Surgical Fix: Isolate the interactivity. The "Add to Cart" button should be an imported Client Component inside a Product Page that remains a Server Component.

2. Metadata and the generateMetadata API

Up to Next.js 12 (Pages Router), we injected titles and meta descriptions with the <Head> tag. In the App Router, the approach shifted to the Metadata API, which is much more robust but easy to break.

The most common error is the lack of dynamic data on product pages (/product/[slug]/page.tsx). If meta tags are generated asynchronously, they must block rendering until resolved.

Audit Evidence (What to look for in the code):

// Incorrect or Rigid Pattern (Fixed on dynamic pages)
export const metadata = {
  title: 'Default Product',
}

// Correct and SEO-Driven Pattern
export async function generateMetadata({ params }): Promise<Metadata> {
  const product = await fetchProduct(params.slug)
  
  // Vital 404 handling at the root
  if (!product) return notFound()

  return {
    title: `${product.name} | Your Store`,
    description: product.short_description,
    alternates: {
      canonical: `https://yourstore.com/product/${params.slug}`
    }
  }
}

Ensure that canonicals and URL parameters are being served via the alternates object. If the canonical is inserted via a script manipulating the DOM, Googlebot will not read it correctly.


3. HTTP Status Management: The "Soft 404" Danger

One of the worst financial scenarios for E-commerce operations occurs when a product permanently goes out of stock and the URL begins to render a visual component saying "Product Not Found", but the server continues responding with HTTP 200 OK.

This causes mass Soft 404s, destroying the bot's trust. In Next.js, ensuring the delivery of real HTTP status codes from the server is fundamental during the quality process before deployment.

Status Audit: In the App Router, whenever a dynamic database fetch fails, the code must strictly call the notFound() function from the next/navigation package. This halts execution, sends the correct HTTP 404 header to the robot, and renders the not-found.tsx file.

If the goal is a 301 redirect, the redirect('/new-route', 'replace') function must be used on the server side.


4. Sitemap Strategy and Crawl Budget

Next.js 13+ made dynamic sitemap creation easier through the generation of the sitemap.ts file. However, dynamically generating heavy sitemaps containing millions of rows by querying the database on-the-fly for every bot request causes extreme slowdowns.

XML sitemaps frequently generate silent errors. A Next.js sitemap audit must verify if caching is being applied to the sitemap.ts (or sitemap.xml) route.

Architecture Check:

  • For sites over 50,000 pages, the native sitemap.ts can exhaust Node.js server memory (Vercel serverless function limits).
  • Evaluate whether engineering is splitting the sitemaps (Sitemap Indexes) or generating them statically at build time, via a Cron Job or CMS Webhooks.

5. The <Image> Component and LCP Diagnosis

You do not audit image performance in Next.js the same way you audit it in WordPress. The native <Image /> component (next/image) applies automatic optimization (.webp or .avif) and prevents Layout Shifts by requiring width and height.

But it can work against SEO if implemented blindly. The main error occurs on the Hero Image (the primary visible image above the fold that dictates your LCP). By default, <Image> applies loading="lazy". Lazy Loading an LCP image drastically delays paint time because the browser waits for the script to run before starting the image download.

In your LCP diagnosis, inspect the code and look for the main image. It must contain the priority flag.

Optimized Pattern (LCP Fix):

<Image
  src="/main-banner.jpg"
  alt="Black Friday Offer"
  width={1200}
  height={600}
  priority={true} // Tells the browser: Fetch this immediately!
/>

Read our guide on image optimization and LCP performance to understand the implications of fetchpriority in modern browsers.


Finally, audit the internal link mesh. If developers use the standard HTML5 <a> tag, they lose the background prefetch feature that Next.js offers.

Conversely, the excessive use of <Link> on dense pages with hundreds of links (like a category gallery) can cause a network traffic jam (network waterfall), as Next.js attempts to download the metadata (JS payload) for all visible links on the screen simultaneously.

The Audit Solution: On immense lists of internal links that do not require instant loading, you must audit the code to ensure the prefetch={false} setting.

<Link href="/heavy-category" prefetch={false}>
  Access Category
</Link>

This disables aggressive prefetching and saves resources on both the user's device and the server.


Conclusion: Next.js and the Future of Search (AEO and SGE)

The promise of Next.js is only fulfilled with rigorous oversight. The Server Components and data API architecture does not just benefit Google; it is structuring your business for the Generative Era.

AI-driven dynamic rendering and the AIs that generate answers on the web prefer to consume fast, clean, and structured HTML. If your Next.js project serves dense HTML and focuses JavaScript on actual interactivity, you won't need to adapt your architecture for the new models.

Use this article and add it to your pre-launch Technical SEO checklist. Audit server components, validate the Metadata API, fix your Soft 404s, and ensure Next.js acts as an organic accelerator, not dead weight.

Direct answers

Frequently asked questions

Is Next.js automatically good for SEO?

No. It provides the tools to be exceptional, but allows for catastrophic misconfigurations. Fetching crucial SEO data via `useEffect` on the client side turns your Next.js site into a standard problematic SPA.

Should I use App Router or Pages Router for my blog?

The App Router (React Server Components) is superior for performance and SEO because it sends zero JavaScript to the client in static components. However, it requires a learning curve to isolate client components only where there is interactivity.

How do I handle dynamic 404 Statuses in Next.js?

Use the `notFound()` function in Next.js after verifying that the data does not exist in the database. This forces the server to return a real HTTP 404. Just rendering a 'Product not found' screen while returning HTTP 200 generates Soft 404s in Google.

One useful idea at a time

Get the next investigation

Practical analysis on SEO, AI, performance, and conversion. No noise, delivered to your inbox.

Sobre o Autor

Avatar de Remountly Team

Remountly Team

Lead Performance Engineer

Especialista com mais de 8 anos otimizando a fundação web de empresas listadas na Fortune 500. Foco cirúrgico em métricas vitais e resiliência de borda.