# Deploying `platform.pattayatogether.com` > 3 honest paths to activate the subdomain. Same approach as Batch 15 ECM (already proven for `ecm.pattayatogether.com`). > > Current state: pages live at `https://console.pattayatogether.com/platform/` (existing GitHub Pages deploy). Subdomain `platform.pattayatogether.com` not yet active — pick one path below to activate. --- ## The infrastructure constraint GitHub Pages allows exactly **one CNAME per repo** (`docs/CNAME` is currently `console.pattayatogether.com`). To expose a second subdomain you must pick one of: | Path | Setup time | Cost | Where ownership lives | |---|---|---|---| | **A · Cloudflare Worker** | ~5 min | Free tier | Cloudflare dashboard (zone) | | **B · Hostinger subdomain** | ~10 min | included in hosting plan | Hostinger hPanel | | **C · Separate GitHub Pages repo** | ~20 min | Free | GitHub (new repo `pattayatogether-platform`) | All three are documented here. Use whichever matches your ops setup. **Don't activate more than one** — they will conflict at the DNS level. --- ## Path A · Cloudflare Worker URL rewrite **Best for:** team already running Cloudflare in front of `pattayatogether.com` (most common). **Result:** `https://platform.pattayatogether.com/*` transparently fetches `https://console.pattayatogether.com/platform/*`. **File:** [`cloudflare-worker.js`](./cloudflare-worker.js) ### Steps (manual, one time, in Cloudflare dashboard — not in repo) 1. Verify zone `pattayatogether.com` is on Cloudflare with proxied DNS (orange cloud). 2. **DNS → Add record:** - Type: `CNAME` - Name: `platform` - Target: `console.pattayatogether.com` - Proxy: **ON** (orange cloud) 3. **Workers & Pages → Create Worker** → paste contents of `cloudflare-worker.js` → Deploy. 4. **Worker → Triggers → Add Route:** - Zone: `pattayatogether.com` - Route: `platform.pattayatogether.com/*` 5. **Test:** ``` curl -I https://platform.pattayatogether.com/ # Expect: HTTP/2 200 · body = docs/platform/index.html ``` **Honest limits:** Worker free tier = 100k req/day. The platform hub is low-traffic, well within limits. --- ## Path B · Hostinger subdomain **Best for:** team already running Hostinger for the live `pattayatogether.com` apex. **Result:** subdomain proxies to GitHub Pages via Hostinger DNS, no Cloudflare needed. **File:** [`hostinger-subdomain.md`](./hostinger-subdomain.md) ### Quick setup 1. Hostinger hPanel → Domains → `pattayatogether.com` → DNS Zone Editor 2. Add `CNAME` record: `platform` → `montienvic-dotcom.github.io` 3. Wait for propagation (~5-30 min) 4. Add `platform.pattayatogether.com` as a custom domain on the existing Pages site OR set up a separate Pages repo (Path C combined with Path B). 5. Test: `curl -I https://platform.pattayatogether.com/` **Honest limits:** Hostinger's free SSL cert may take longer to issue (up to 1 hr). --- ## Path C · Separate GitHub Pages repo **Best for:** clean separation · independent deploy cycle · independent CNAME. **Result:** `platform.pattayatogether.com` served by a dedicated repo `pattayatogether-platform`. **File:** [`gh-pages-separate-repo.md`](./gh-pages-separate-repo.md) ### Quick setup 1. Create new repo `montienvic-dotcom/pattayatogether-platform` (public). 2. Mirror `docs/platform/` + `docs/architecture/` from this repo into the new repo's `/` (root). 3. Add `CNAME` file in root: `platform.pattayatogether.com` 4. Enable Pages: Settings → Pages → Source: main branch / root. 5. DNS: add `CNAME platform → montienvic-dotcom.github.io`. 6. Test: `curl -I https://platform.pattayatogether.com/` **Mirror script:** see `gh-pages-separate-repo.md` for the rsync/git workflow. **Honest limits:** sync drift if not automated — recommend a GitHub Actions workflow that mirrors on every commit to this repo's `main`. --- ## After activation Regardless of path, once the subdomain is live: 1. Update `docs/platform/index.html` foot to reflect deployment 2. Update `docs/platform/status.html` — verify origin detection 3. File `REQ-010` in `.claude/REQ_QUEUE.md` if production hardening needed 4. Add subdomain to monitoring (PagerDuty · Cloudflare Analytics · uptimerobot.com free tier) ## Fallback behavior If subdomain not active, all pages still work at `https://console.pattayatogether.com/platform/*`. The console tile in `docs/index.html` routes there. **Zero downtime to enable later** — pick a path when ops bandwidth allows.