From 313adb714292b2f7eca0ff2d7085b8c1a198dfa8 Mon Sep 17 00:00:00 2001 From: Suguru Inatomi Date: Thu, 11 Jun 2026 21:44:49 +0900 Subject: [PATCH] fix(robots): disallow /api/ from crawlers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit /api/ は upstream の Angular ソースから自動生成される API リファレンスで日本語化対象外。 日本語サイトとしての SEO 価値がなく、検索クローラ (Bing/Yandex 等) によるクロールが Firebase Hosting の egress 増大の主要因になっていた。 robots.txt で /api/ を Disallow し、不要なクロールを抑制する。 --- tools/adev-patches/replace-robots.patch | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 tools/adev-patches/replace-robots.patch diff --git a/tools/adev-patches/replace-robots.patch b/tools/adev-patches/replace-robots.patch new file mode 100644 index 000000000..32f52a9bf --- /dev/null +++ b/tools/adev-patches/replace-robots.patch @@ -0,0 +1,13 @@ +diff --git a/adev/src/robots.txt b/adev/src/robots.txt +index 20a871a810..8fd1157557 100644 +--- a/adev/src/robots.txt ++++ b/adev/src/robots.txt +@@ -1,3 +1,6 @@ +-# Allow all URLs (see https://www.robotstxt.org/robotstxt.html) ++# Allow most URLs, disallow auto-generated English /api/ from crawlers. ++# /api/ is not localized (auto-generated from upstream Angular source). + User-agent: * +-Disallow: ++Disallow: /api/ ++ ++Sitemap: https://angular.jp/sitemap.xml