62 lines
1.3 KiB
TypeScript
62 lines
1.3 KiB
TypeScript
|
|
import type { MetadataRoute } from "next";
|
||
|
|
|
||
|
|
export const dynamic = "force-static";
|
||
|
|
|
||
|
|
// Moteurs de recherche + robots d'aperçu de lien (pour que le référencement
|
||
|
|
// et les cartes Open Graph continuent de fonctionner quand tu partages le site).
|
||
|
|
const ALLOWED = [
|
||
|
|
"Googlebot",
|
||
|
|
"Google-InspectionTool",
|
||
|
|
"Bingbot",
|
||
|
|
"DuckDuckBot",
|
||
|
|
"facebookexternalhit",
|
||
|
|
"Twitterbot",
|
||
|
|
"LinkedInBot",
|
||
|
|
"Slackbot-LinkExpanding",
|
||
|
|
"Discordbot",
|
||
|
|
"TelegramBot",
|
||
|
|
"WhatsApp",
|
||
|
|
];
|
||
|
|
|
||
|
|
// Robots d'entraînement IA et scrapers connus : bloqués explicitement.
|
||
|
|
const BLOCKED = [
|
||
|
|
"GPTBot",
|
||
|
|
"ChatGPT-User",
|
||
|
|
"OAI-SearchBot",
|
||
|
|
"ClaudeBot",
|
||
|
|
"Claude-Web",
|
||
|
|
"anthropic-ai",
|
||
|
|
"Google-Extended",
|
||
|
|
"PerplexityBot",
|
||
|
|
"CCBot",
|
||
|
|
"Bytespider",
|
||
|
|
"Amazonbot",
|
||
|
|
"Applebot-Extended",
|
||
|
|
"Meta-ExternalAgent",
|
||
|
|
"FacebookBot",
|
||
|
|
"cohere-ai",
|
||
|
|
"Diffbot",
|
||
|
|
"Omgilibot",
|
||
|
|
"ImagesiftBot",
|
||
|
|
"YouBot",
|
||
|
|
"AhrefsBot",
|
||
|
|
"SemrushBot",
|
||
|
|
"MJ12bot",
|
||
|
|
"DotBot",
|
||
|
|
"DataForSeoBot",
|
||
|
|
"Scrapy",
|
||
|
|
];
|
||
|
|
|
||
|
|
export default function robots(): MetadataRoute.Robots {
|
||
|
|
return {
|
||
|
|
rules: [
|
||
|
|
...ALLOWED.map((userAgent) => ({ userAgent, allow: "/" })),
|
||
|
|
...BLOCKED.map((userAgent) => ({ userAgent, disallow: "/" })),
|
||
|
|
// Tout le reste : interdit.
|
||
|
|
{ userAgent: "*", disallow: "/" },
|
||
|
|
],
|
||
|
|
sitemap: "https://francktwl.fr/sitemap.xml",
|
||
|
|
host: "https://francktwl.fr",
|
||
|
|
};
|
||
|
|
}
|