判断
GitHub Pages URLを無効にした後、旧リンクは404になった。canonical整理としては明確だが、既存リンク利用者には不親切なので、github.io repositoryをredirect-only shimとして再作成する方針にした。
実装
- README、index.html、404.html、robots.txt、.nojekyllだけを含むpublic ytkim4558.github.io repositoryを作成した。
- meta refreshとJavaScript location.replaceで同じpathをhttps://ytkim4558.pages.dev/へ転送する。
- noindex,followとcanonical metadataはCloudflare Pages URLを指すようにした。
- Future agentがredirect repositoryへ実コンテンツを入れないよう、agent-opsにも役割を記録した。
制約
この静的user-site構成ではGitHub Pages側に任意のserver-level 301 ruleを置けない。Deep linkはcustom 404 pageでredirectするため、browserでは遷移するがHTTP statusは404のままになる。