Platforms · Next.js
SEO and GEO checks for Next.js sites
Next.js gives you full control, which also means every canonical, robots rule and redirect is yours to get right. The settings behind common findings, with App Router examples.
Render the content on the server
In the App Router, Server Components render on the server by default, so their text is in the HTML. Content fetched in a client component after the page loads is not. If the main text of a page depends on useEffect, crawlers that do not run JavaScript will miss it.
Canonicals and alternates with the Metadata API
Set metadataBase once in the root layout. Relative canonical and alternate paths are then written out as absolute URLs, which is what Google recommends.
export const metadata = {
metadataBase: new URL('https://example.com'),
alternates: {
canonical: '/',
languages: { 'en-US': '/en-US', 'de-DE': '/de-DE' },
},
};For each dynamic route, set the canonical in generateMetadata from the same slug you use to fetch the content, so query strings never end up in it.
Redirects, robots and preview deployments
- Permanent redirects in next.config use status 308, temporary ones 307. Google treats them like 301 and 302.
- app/robots.ts and app/sitemap.ts generate robots.txt and the sitemap from code. Check the production output, not just the source.
- Vercel adds an X-Robots-Tag: noindex header to preview deployments and to production deployments opened through their unique URL. That is intended, but make sure your custom domain does not send it.
- Pick one trailing-slash style with the trailingSlash option and use it in canonicals and links.
module.exports = {
async redirects() {
return [{ source: '/old-pricing', destination: '/pricing', permanent: true }];
},
};Questions
Pages Router or App Router?
Both can render on the server. The checks are the same: what matters is what the HTML contains.
Can I scan a preview deployment?
Yes, if it is publicly reachable. Expect a noindex finding there; that is Vercel’s default for previews.
Does VisibleScan run my JavaScript?
Yes. It reads the server HTML and also renders the page in an isolated browser on desktop and mobile, then compares the two.