Last week, while preparing our production gaming companion app Dungeon Quest Reborn Guide for launch using Next.js 16 with output: 'export', we ran into a pair of silent SEO failures that would have tanked our search visibility if we'd shipped as-is. Ahrefs and Google Search Console both flagged the same two critical issues: every single inner page had its og:url pointing to the homepage root (/), and nine newly generated pages were completely missing from crawlable indexation.

The Problem: App Router's Default Metadata Behavior

The culprit was Next.js App Router's metadata generation defaults. When you use output: 'export' for static site generation, the framework handles OG tags differently than traditional SSR setups. In our case, the og:url meta tag wasn't being dynamically set per route—instead, it inherited whatever canonical or absolute URL was configured at the root layout level. This meant social previews and search engine understanding were fundamentally broken across all inner pages.

Diagnosing With Real SEO Tools

We caught this only because we ran Ahrefs' site crawler against our staging environment before deploying to production. The tool immediately surfaced that every page from /guides/ to /items/database had identical og:url values pointing back to the domain root. Google Search Console's URL inspection tool confirmed the same pattern when testing individual inner routes. Neither platform threw errors—the failure mode was silent, which makes it particularly dangerous for teams without rigorous pre-launch SEO audits.

The Fix: Explicit Metadata Per Route

The solution involved ensuring every page exported its own metadata object with a properly constructed absolute URL using the current pathname. Instead of relying on root-level defaults, each route's generateMetadata function now explicitly constructs og:url by combining the base domain with the current route segment. For the nine missing pages, we traced the issue to dynamic routes that weren't being included in the static export manifest—adding them to the generateStaticParams export resolved the crawl gaps.

Key Takeaways

  • Always audit OG tags with external crawlers before launch, not just internal testing
  • With App Router's output: 'export', metadata defaults don't always propagate correctly across nested routes
  • Dynamic routes require explicit generateStaticParams exports to appear in static builds
  • og:url must be an absolute URL per page for proper social sharing and search indexing

The Bottom Line

Next.js App Router makes building React apps faster, but its abstraction layer can silently break fundamental SEO signals if you don't audit the output. Run crawlers against staging before every production deploy—your search rankings depend on it.