setup-guides

Serving HabitForge from habitforge.ai

The revived HabitForge is a branded front-end over HiveJournal's shared app (docs/product/HABITFORGE_REVIVAL.md) — same Next deploy, different front door. This guide is the one-time infra to make habitforge.ai/ serve the real HabitForge landing.

Why a rewrite, not a redirect (the whole point): habitforge.ai/ must return the HabitForge page with a 200 at its own URL — NOT 301 to hivejournal.com. A redirect hands every ounce of SEO authority back to hivejournal.com and habitforge.ai never ranks. The code side is already done with a host rewrite in apps/frontend/src/middleware.ts (preserves the URL bar) + a canonical pinned to https://habitforge.ai/ on the landing.

We'll buy back habitforge.com later; until then habitforge.ai is the home.

What's already wired in code

  • Middleware (src/middleware.ts): habitforge.ai / www.habitforge.ai / staging.habitforge.ai root → rewrite to /variant-c (the HabitForge landing). Habit surfaces (/compare/habitforge, /best-habit-trackers-2026, /downstream, /play-forward, /workout-window, /mantras) + /auth + /dashboard pass through, so a visitor stays on habitforge.ai through the funnel.
  • Canonical: the landing (/variant-c/page.tsx, now a server wrapper) pins alternates.canonical = https://habitforge.ai/ + HabitForge-scoped OpenGraph/Twitter, so Google indexes it under habitforge.ai and doesn't leak authority to hivejournal.com.

What YOU do (console — I can't touch DNS/Vercel)

  1. Vercel → the HiveJournal project → Settings → Domains → Add:

    • habitforge.ai
    • www.habitforge.ai (Vercel auto-provisions TLS once DNS resolves.)
  2. DNS at your registrar (Namecheap, same as the other brand domains):

    HostTypeValue
    @ (apex habitforge.ai)A76.76.21.21
    wwwCNAMEcname.vercel-dns.com
  3. Wait for propagation + TLS (minutes to ~an hour), then verify:

    • https://habitforge.ai/ shows the HabitForge landing (not the HiveJournal home), URL bar stays on habitforge.ai.
    • curl -sI https://habitforge.ai/ returns 200 (not 301/302).
    • View source → the canonical is https://habitforge.ai/.
    • https://habitforge.ai/compare/habitforge and /best-habit-trackers-2026 load on the brand domain.

That's it — no redeploy needed for the DNS step (the middleware already ships); adding the domain in Vercel is what activates the host match.

Follow-ups (not blocking the domain going live)

  • Slice 1 of the revival — retarget the /variant-c landing content itself (replace the generic sign-up hero with the whole-loop depth + the origin story). The routing + canonical are done; the content upgrade is the next SEO slice.
  • Canonical strategy for the habit SEO pages/compare/habitforge + /best-habit-trackers-2026 currently canonical to hivejournal.com (they were built there). Once habitforge.ai is live and we want those pages to build habitforge.ai's authority, decide whether to re-canonical them to habitforge.ai/.... Deferred deliberately — get the domain serving first.
  • Buy back habitforge.com when the budget allows; then 301 it → habitforge.ai (the reverse of today), consolidating the original brand's residual links onto the live home.
HABITFORGE AI DOMAIN — Docs | HiveJournal