fix(robots): disallow /api/ from crawlers#1173
Merged
Merged
Conversation
/api/ は upstream の Angular ソースから自動生成される API リファレンスで日本語化対象外。 日本語サイトとしての SEO 価値がなく、検索クローラ (Bing/Yandex 等) によるクロールが Firebase Hosting の egress 増大の主要因になっていた。 robots.txt で /api/ を Disallow し、不要なクロールを抑制する。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
翻訳・修正
変更内容はCONTRIBUTING.md に記載されたワークフローに従っていることを確認してください。
関連Issue
なし
備考
/api/は upstream の Angular ソースから自動生成される API リファレンスで、angular-ja では日本語化対象外(auto-generated、localizedFilePatternsの対象外)。日本語サイトとしては SEO 価値がなく、検索クローラ (Bingbot/YandexBot/Amazonbot 等) によるクロールが Firebase Hosting の egress 増大の主要因になっていました。実測では Bingbot の
/api系トラフィックだけで 1 日あたり数百 MB を占めています。robots.txt で
/api/を Disallow に変更することで:/api/配下のクロールを停止させ、Firebase egress を削減/api/配下のページが徐々にインデックスから外れていく(API リファレンスを検索したいユーザーは英語の angular.dev に誘導される想定)変更内容
tools/adev-patches/replace-robots.patchを追加し、upstream のadev/src/robots.txtを以下に置き換え:pnpm testで patch が正常に apply されることを確認済み。