From 174c5d8efca01715f6d7f1eadeb25a647f54c875 Mon Sep 17 00:00:00 2001 From: Joey Chen <142381267+JoeyC-Dev@users.noreply.github.com> Date: Tue, 15 Apr 2025 17:28:24 +0800 Subject: [PATCH] fix: disallow crawling from `/_astro/` (#399) * fix: disallow crawling from `/_astro/` * fix: add missing newline at end of robots.txt.ts file --------- Co-authored-by: Joey Chen Co-authored-by: L4Ph <4ranci0ne@gmail.com> --- src/pages/robots.txt.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/robots.txt.ts b/src/pages/robots.txt.ts index 76c1a23b..cf9107f9 100644 --- a/src/pages/robots.txt.ts +++ b/src/pages/robots.txt.ts @@ -2,7 +2,7 @@ import type { APIRoute } from "astro"; const robotsTxt = ` User-agent: * -Allow: / +Disallow: /_astro/ Sitemap: ${new URL("sitemap-index.xml", import.meta.env.SITE).href} `.trim();