How I Built a Pre-Merge SSR SEO Audit Gate for Next.js 16 Content Pages
When you ship programmatic or template-driven content pages in Next.js, next build and ESLint will happily pass while your pages quietly fail in Google Search Console as "Crawled - currently not indexed." I ran into this firsthand while building and scaling structured reference pages for Tarot Fortune Cards on Next.js 16 (App Router) + React 19 + next-intl . The UI looked great in Chrome,…
When building programmatic or template-driven content pages in Next.js, both the build process and ESLint may pass without warning that the pages will fail to index in Google Search Console. During development of structured reference pages for Tarot Fortune Cards using Next.js 16 (App Router) and React 19, the UI appeared correct in Chrome and Lighthouse ratings were positive, yet inspecting the raw HTML accessible by crawlers revealed four minor bugs that were preventing proper indexing.
Rather than manually checking after deployment, these failure modes were transformed into an automated pre-merge SEO gate consisting of two stages: a static repository check and a live Vercel preview SSR HTML check. This article outlines what the gate detects and the specific patterns that can be incorporated into a custom Next.js workflow.
Understanding why checking in Chrome DevTools is misleading, modern Next.js applications combine Server Components, Client Components, dynamic imports, and next/image. When inspecting a page in Chrome DevTools, you are viewing the post-hydration DOM. While search crawlers eventually render JavaScript, initial crawl discovery, canonical evaluation, and structured data extraction heavily favor clean first-response SSR HTML.
If important content, comparison tables, or FAQ answers are only revealed after client-side hydration or if a template unintentionally repeats up to 30% of identical sentences across sibling routes, indexation will suffer. Four silent bugs that the pre-merge gate addresses include:
1. Cross-page boilerplate overlap (template cannibalization)
2. Above-the-fold media accidentally lazy-loaded or oversized
3. Broken heading hierarchy and missing server-rendered structured data
4. Absence of critical meta tags and schema markup
The automated gate prevents branch merges if any of these issues are detected. To ensure indexation, the gate enforces a 15% pairwise normalized sentence overlap ceiling, requiring WebP images with a file-size limit of 60 KB, enforcing proper width and height attributes on rendered img tags, checking SSR HTML for loading="lazy" on critical visuals, and verifying proper heading hierarchy and server-rendered structured data.
By incorporating these checks into a pre-merge SEO gate, developers can identify and fix potential indexing issues before deployment, improving both user experience and search engine visibility.
Rewritten by urgent.news; may contain errors — check the original.
Source: dev.to