2026-02-02 20:34:35 +00:00
|
|
|
/**
|
|
|
|
|
* Robots.txt Configuration
|
|
|
|
|
* Controls search engine crawling behavior
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
import { MetadataRoute } from 'next';
|
2026-08-20 22:10:07 +01:00
|
|
|
import { absoluteUrl } from '@/lib/site';
|
2026-02-02 20:34:35 +00:00
|
|
|
|
|
|
|
|
export default function robots(): MetadataRoute.Robots {
|
|
|
|
|
return {
|
|
|
|
|
rules: [
|
|
|
|
|
{
|
|
|
|
|
userAgent: '*',
|
|
|
|
|
allow: '/',
|
2026-09-02 16:17:55 +01:00
|
|
|
// /admin and /cms-api are also served X-Robots-Tag: noindex by
|
|
|
|
|
// next.config.mjs. A Disallow alone blocks crawling, not indexing.
|
|
|
|
|
disallow: ['/api/', '/_next/', '/admin/', '/cms-api/'],
|
2026-02-02 20:34:35 +00:00
|
|
|
},
|
|
|
|
|
],
|
2026-08-20 22:10:07 +01:00
|
|
|
sitemap: absoluteUrl('/sitemap.xml'),
|
2026-02-02 20:34:35 +00:00
|
|
|
};
|
|
|
|
|
}
|