Skip to content

Commit e0eab00

Browse files
committed
chore(web): keep settings out of search results
/settings is a per-viewer preferences page with nothing to index, and it sets robots noindex already; robots.txt now says so too, next to /me. Also records why character pages are not in the sitemap: like sticker pages they are linked from every pack page, and the distinct characters can only be found by walking every pack's detail. Claude-Session: https://claude.ai/code/session_01WYeKk1xWGbYeENdb6Ez3xL
1 parent fc43ca7 commit e0eab00

2 files changed

Lines changed: 9 additions & 3 deletions

File tree

‎apps/web/public/robots.txt‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ Disallow: /ja/auth
66
Disallow: /me
77
Disallow: /en/me
88
Disallow: /ja/me
9+
Disallow: /settings
10+
Disallow: /en/settings
11+
Disallow: /ja/settings
912
Disallow: /api
1013

1114
Sitemap: https://sticker.kungal.com/sitemap_index.xml

‎apps/web/server/api/__sitemap__/urls.ts‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,12 @@ export default defineCachedEventHandler(
4141
const urls: SitemapEntry[] = [entry('/', 1), entry('/about', 0.6)]
4242
const apiBase = useRuntimeConfig().apiBaseUrl
4343

44-
// Individual sticker pages are deliberately absent: they are linked from
45-
// every pack page, so crawlers still reach them, and listing them here grew
46-
// the file by one URL per sticker per locale with no ceiling.
44+
// Individual sticker pages and character pages are deliberately absent.
45+
// Both are linked from every pack page, so crawlers still reach them, and
46+
// neither can be enumerated cheaply: stickers grow the file by one URL per
47+
// sticker per locale with no ceiling, and the distinct characters are only
48+
// discoverable by walking every pack's detail. Add a listing endpoint first
49+
// if character pages ever need to be in here.
4750
try {
4851
const authors = new Set<number>()
4952

0 commit comments

Comments
 (0)