Files
school_compare/nextjs-app/app/robots.ts
T
TudorandClaude Opus 5 0da8ab052b fix(seo): canonicalise on the www host, which is the one that serves 200
The apex 301s to www at Cloudflare, but metadataBase, the school-page
canonical, robots.txt's Sitemap: line and the sitemap's own <loc> entries all
named the apex. Every one of those pointed Google at a redirect.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015mWQnpye9F299NVRCCSRvj
2026-08-20 22:10:07 +01:00

21 lines
400 B
TypeScript

/**
* Robots.txt Configuration
* Controls search engine crawling behavior
*/
import { MetadataRoute } from 'next';
import { absoluteUrl } from '@/lib/site';
export default function robots(): MetadataRoute.Robots {
return {
rules: [
{
userAgent: '*',
allow: '/',
disallow: ['/api/', '/_next/'],
},
],
sitemap: absoluteUrl('/sitemap.xml'),
};
}