acme.com/blog to Notra from a TanStack Start app, which builds its server with Nitro, so the rewrite goes into the nitro() plugin in vite.config.ts. On Vercel you use edge routes and on every other host Nitro’s routeRules, the same setup that serves usenotra.com/docs. Read the steps on every platform first, and replace acme.notra.site with the Notra address on your site’s Domains page.
On Vercel
Edge routes forward the request before it reaches your app, which is fast and keeps every header.vite.config.ts
src/routes/blog and src/routes/changelog routes and drop those pages from your own sitemap and RSS feed, because Notra serves its own under each path.
On any other host
Nitro’srouteRules proxy the paths from your server, which works on Netlify, Cloudflare, Node and every other Nitro preset.
vite.config.ts
routeRules in nitro.config.ts.
Limits to keep in mind
- Security headers on
/**. ArouteRulesentry like"/**": { headers: { "content-security-policy": ... } }also applies to proxied pages and replaces Notra’sContent-Security-Policy, which blocks the site’s own scripts, so exclude the section paths from it. Edge routes on Vercel run before these rules and aren’t affected. - Nitro 2. Nitro 3 (
nitro/vite, used by TanStack Start) keeps theAcceptheader, while Nitro 2 (nitropack, for example in Nuxt 3) drops it inrouteRulesproxies, so AI agents asking for Markdown get HTML. The.mdURLs (/blog/launch.md) work either way. - Your own middleware. Middleware in
src/start.tsdoesn’t run for the section paths with edge routes or withrouteRules, because Nitro forwards the request before TanStack Start sees it.