Automated technical SEO checks that catch indexing blocks and deploy regressions — seotto.com
Next.js's App Router is, on the whole, good news for SEO. Server components render HTML by default, there's a typed metadata API instead of hand-written <head> tags, and sitemaps and robots files can be generated from code.
But "good defaults" isn't the same as "nothing to check". Most App Router SEO bugs I see come from a handful of specific traps. Here's the checklist I'd run before launch, and again after any big upgrade.
Metadata
1. Set metadataBase in the root layout. Canonicals, Open Graph images and alternates are often written as relative paths. Without metadataBase, Next.js can't turn them into absolute URLs correctly, and you get warnings in development or wrong URLs in production:
// app/layout.tsx
export const metadata = {
metadataBase: new URL("https://www.example.com"),
title: { default: "Example", template: "%s | Example" },
};
Use the production URL from configuration, not from the request host, so preview deployments don't emit canonicals pointing at themselves.
2. Every indexable page gets its own title and description. Use generateMetadata for dynamic routes, built from the same data the page renders. The title template in the root layout keeps formatting consistent. Search the build output for pages that fell back to the default title; they're usually dynamic routes where generateMetadata was forgotten.
3. Set canonicals explicitly. alternates: { canonical: "/blog/my-post" } in each page's metadata. Don't rely on the absence of a canonical. Watch for query strings and pagination: page 2 of a listing should canonicalise to itself, not to page 1.
4. Keep metadata in server components. metadata and generateMetadata can't be exported from a "use client" file. If you find yourself setting document.title in an effect, that page's metadata isn't in the server HTML, and crawlers that don't render won't see it.
Rendering and content
5. Check that important content is in the server HTML. Server components render on the server, but anything inside a client component that fetches data in useEffect appears only after JavaScript runs. Product descriptions, article bodies and prices should come from server components or be passed in as props. Check with curl -s https://www.example.com/page | grep "a sentence from the content".
6. Use next/link for internal links. It renders real <a href> elements, which crawlers can follow. Click handlers with router.push and no href are invisible to them.
Status codes
7. Make sure notFound() actually returns a 404. Calling notFound() renders your not-found page. If it's called before the response starts streaming, the status is 404. If it's called inside a part of the page that streams later (behind a loading.tsx or a Suspense boundary), the status code has already been sent as 200, and Next.js falls back to adding a noindex robots tag instead. That's a soft 404. Check the real status with curl for a missing slug, and move the existence check above any streaming boundary if needed.
curl -s -o /dev/null -w '%{http_code}\n' https://www.example.com/blog/this-does-not-exist
8. Know which redirect code you're sending. redirect() in a server component sends a temporary redirect by default; permanentRedirect() sends a permanent one. Redirects in next.config.js with permanent: true use 308, not 301. Search engines treat 308 like 301, but some older tools and checkers don't, so don't be surprised by reports saying "308".
A single config change in a Next.js upgrade can change status codes, canonicals or robots tags across every route. seotto.com checks for indexing blocks and deploy regressions after you ship, so a
notFound()that started returning 200 or a canonical pointing at a preview host gets caught quickly.
Sitemaps and robots
9. Generate the sitemap from your data. app/sitemap.ts returns an array of URLs. Build it from the same source as your pages, include only canonical, indexable URLs, and use real lastModified dates rather than new Date() on every build, which tells crawlers every page changed every time. For more than 50,000 URLs, use generateSitemaps to split the sitemap.
10. Generate robots.txt per environment. app/robots.ts makes it easy to disallow everything on preview deployments and allow crawling in production. Make the switch depend on an explicit production flag, and test the production output after deploy, because getting this backwards is a very fast way to deindex a site.
Structure
11. Pick a trailing slash policy and stick to it. trailingSlash in next.config.js decides whether /about or /about/ is canonical, and Next.js redirects the other form. Changing it later changes every URL on the site. Make sure canonicals, sitemap URLs and internal links all match the policy.
12. Add structured data in the server HTML. Render JSON-LD with a <script type="application/ld+json"> in the page's server component, built from the page's data. Escape the JSON properly (for example, replace < with \u003c) so content can't break out of the script tag.
After every Next.js upgrade
Major versions have changed defaults that matter for SEO: caching behaviour, how metadata is streamed, how redirects and rewrites are evaluated. After an upgrade, rerun the status-code and canonical checks above on one URL per route type before you deploy. It takes five minutes, and it's much cheaper than finding out from the indexing report a month later.
Before and after launch
- Crawl the production build with a crawler user agent and compare titles, canonicals, status codes and robots tags against your expectations.
- Request a nonexistent URL in every dynamic route and confirm a 404.
- Check
robots.txtandsitemap.xmlon the production domain, not the preview. - Watch Search Console's page indexing report for the first few weeks, and keep an automated check like seotto.com running after every deploy.
Related reading
- CSR vs SSR vs SSG vs ISR: an SEO comparison without the framework marketing
- Google renders your page with last week's JavaScript: a 10-point checklist for assets crawlers can actually fetch
- Pagination SEO in 2026: rel=next is dead, and these 5 checks matter instead
- Make title and meta description required props. If a page can ship without them, it will.
- Case study (hypothetical): a CDN cached a staging 'noindex' header on 4,000 product pages for 11 days
Which App Router SEO trap caught you? For me it was notFound() inside a streamed segment returning 200 for months before anyone noticed.
Top comments (0)