Next.js static export SEO checklist for Cloudflare Pages
A static Next.js site on Cloudflare Pages can be incredibly fast and SEO-friendly — but only if you configure metadata, sitemaps, trailing slashes, and structured data correctly.
A static Next.js site on Cloudflare Pages can be incredibly fast and SEO-friendly — but only if you configure metadata, sitemaps, trailing slashes, and structured data correctly.
Set output: 'export', trailingSlash: true, and images: { unoptimized: true }. Trailing slashes are required for Cloudflare Pages to serve /slug/index.html correctly.
Export metadata from server components and generateMetadata for dynamic routes. Set metadataBase once in the root layout so Open Graph URLs resolve correctly.
Both files run at build time. Use export const dynamic = 'force-static' in Next.js 15+ so they are included in the static export. Allow AI crawlers like GPTBot and ClaudeBot.
Include Organization, WebSite, BreadcrumbList, FAQPage, and Article schemas. Validate with Google Rich Results Test and Schema.org Validator.
An /llms.txt file helps AI crawlers quickly understand your site, key pages, and licensing. It is becoming a standard signal for AI search visibility.