> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tuturuuu.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Tasks legacy hostname cutover

> Redirect Tasks navigation to the apex and preserve API, asset, webhook, and authentication traffic on the legacy hostname.

On activation, `tasks.tuturuuu.com` sends browser GET and HEAD requests to
`tuturuuu.com/tasks`. The redirect preserves locale prefixes, nested trailing
slashes, and the query, including repeated keys and escaped values. Leading
slash runs collapse for matching and for the navigation target. The bare
legacy hostname maps to `/tasks`.

API requests, assets in the Tasks public inventory, webhooks, and auth
callbacks continue to use the legacy Tasks Worker. The redirect Worker sends
those requests to `APP_TASKS` without changing their URL, method, or headers.
POST requests and non-navigation fetches also pass through.
The legacy host and apex aliases both require an `Accept` preference for
UTF-8 HTML over JSON. A missing header, a tie, or rejection of UTF-8 HTML
keeps the request with its serving Worker even when Fetch Metadata
indicates a document.

The apex Gateway serves `/en/tasks` and `/vi/tasks` with a `307` to
`/tasks/en` and `/tasks/vi` when the mount is active and a GET or HEAD
request prefers `text/html`. Requests with an `Upgrade` header or
non-document Fetch Metadata remain with Web.

## Cutover

Use the [Finance attachment procedure](https://docs.tuturuuu.com/build/devops/finance-start-void.md#legacy-hostname)
and the gateway's [legacy redirect handler](https://docs.tuturuuu.com/build/devops/gateway-worker.md#legacy-subdomain-redirect).
Tasks has a dedicated `tuturuuu-tasks-legacy-redirect` deployment so its
redirect status can change independently. Generate the unattached configuration
with `node scripts/active-app-mounts.mjs --render-tasks-redirect`. The generated
config's entry path is relative to `apps/gateway`.

1. Complete signed-in apex QA in a disposable workspace. Check central profile
   and `verify-token` returns, a deep board link, both locale aliases, a
   referenced asset, and the board API. Check that the default-board fallback
   keeps the locale and query. Open the Tasks Calendar view and verify its
   signed-in requests reach the Calendar mount, which rejects anonymous calls.
2. Capture the Tasks Custom Domain, its exact `tasks.tuturuuu.com/*` zone
   route, and the active Worker deployment and version. Stage the reviewed
   redirect candidate at 0% where supported, or verify it before attaching the
   first version. Reassign only the existing zone route. It takes precedence
   over the Tasks Custom Domain, which stays attached to `tuturuuu-tasks`.
   The redirect Worker's `APP_TASKS` binding forwards API, asset, callback,
   webhook and other machine requests unchanged.
3. Verify at the edge that GET and HEAD navigations get a `307` to the mount
   with the expected path and query. The Gateway smoke's
   `--tasks-legacy-base https://tasks.tuturuuu.com` option also checks JSON
   document requests and an explicit HTML rejection. Verify machine paths and record the
   first successful readback time. Observe for at least two hours without
   routing, asset, session or API regressions.
4. After the soak, add `--permanent` to render the `301` configuration. Stage
   and verify it before shifting traffic and repeat the same smoke. Both
   versions use `Cache-Control: no-store`.

To roll back the cutover, restore the captured Tasks zone route's Worker and
verify the app Worker handles the hostname again. To undo only the `301`
promotion, restore the verified `307` version.

## Regression tests

The Gateway's `tasks-mount.test.ts` covers the localized aliases, query
preservation, lookalike mounts, disabled routes, and method boundaries.
`subdomain-redirect.test.ts` covers redirect status, escaped paths, and
machine paths. The Tasks Worker's public asset test checks the manifest
against the files under `apps/tasks/public`. The Tasks workspace model test
checks the entry-board redirect when the root falls back to the task entrypoint.
The page-route test covers the original query through the locale middleware
rewrite and Start URL normalization.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.