- Update replay-schema-v1.json to pages.dev - Update robots.txt sitemap URL to pages.dev - Update test-match-list.html thumbnail URLs to pages.dev/r2/ - Add decision note documenting standardization All user-facing absolute URLs now use the working pages.dev origin. The aicodebattle.com domain is NXDOMAIN and was never registered. R2 data is served through Pages Functions (/r2/*) eliminating the need for a separate b2.aicodebattle.com CDN host. Co-Authored-By: Claude <noreply@anthropic.com>
2.7 KiB
| name | description | metadata | ||
|---|---|---|---|---|
| canonical-public-domain | Standardized on ai-code-battle.pages.dev as canonical public domain |
|
Canonical Public Domain Decision
Decision
Standardized on ai-code-battle.pages.dev as the canonical public domain.
Background
The domain aicodebattle.com is NXDOMAIN (not registered). The site is deployed and functional at ai-code-battle.pages.dev. References to aicodebattle.com and b2.aicodebattle.com existed in documentation and test files.
Rationale
- Registering
aicodebattle.comrequires human action and payment - Cloudflare Pages provides a production-ready public URL at
ai-code-battle.pages.dev - R2 storage is now served through Pages Functions (
/r2/*path), eliminating the need for a separateb2.aicodebattle.comCDN host - Standardizing on pages.dev ensures all user-facing URLs work immediately
Changes Made
Updated Files
-
web/public/replay-schema-v1.json
- Updated
$idfield fromhttps://aicodebattle.com/replay-schema-v1.jsontohttps://ai-code-battle.pages.dev/replay-schema-v1.json
- Updated
-
web/public/robots.txt
- Updated sitemap URL from
https://aicodebattle.com/sitemap.xmltohttps://ai-code-battle.pages.dev/sitemap.xml
- Updated sitemap URL from
-
web/public/test-match-list.html
- Updated thumbnail URL from
https://b2.aicodebattle.com/thumbnails/...tohttps://ai-code-battle.pages.dev/r2/thumbnails/...
- Updated thumbnail URL from
Files Already Correct
- web/src/og-tags.ts - Already uses
https://ai-code-battle.pages.dev - web/src/pages/playlists.ts - Uses dynamic
window.location.originfor embed URLs - web/src/pages/clip-maker.ts - Twitter share uses external domain (correct)
- web/index.html - OG tags already use pages.dev
- web/embed.html - OG tags already use pages.dev
URL Pattern
All user-facing absolute URLs now follow the pattern:
https://ai-code-battle.pages.dev/<path>
Dynamic URLs use window.location.origin which resolves to pages.dev in production.
Replay and Data URLs
Replays and match data are served through Cloudflare Pages Functions:
- Replays:
https://ai-code-battle.pages.dev/r2/replays/{match_id}.json.gz - Match metadata:
https://ai-code-battle.pages.dev/r2/matches/{match_id}.json - Thumbnails:
https://ai-code-battle.pages.dev/r2/thumbnails/{match_id}.png - Bot cards:
https://ai-code-battle.pages.dev/r2/cards/{bot_id}.png - Evolution status:
https://ai-code-battle.pages.dev/r2/evolution/live.json
Future Consideration
If aicodebattle.com is registered later, it can be added as a custom domain in Cloudflare Pages. The internal URLs will remain valid as pages.dev will continue to work as the origin.
Verified
All user-facing absolute URLs emitted by the web application resolve correctly in a browser.