acme.com/blog to Notra with rewrites in next.config.ts, which works on Vercel and on any other host that runs Next.js. Read the steps on every platform first, and replace acme.notra.site with the Notra address on your site’s Domains page.
1
Add the rewrites
next.config.ts
beforeFiles makes the rewrites win over pages in your app, and if your app has no /blog route, a plain array works too. If you already return rewrites, add these entries to your beforeFiles list.2
Keep proxy.ts away from these paths
If you have a
proxy.ts (middleware.ts before Next.js 16) that redirects, rewrites or requires a login, exclude the section paths in its matcher:proxy.ts
3
Deploy and check
Deploy, open
https://www.acme.com/blog/_notra/probe.txt to confirm the rewrite works, then click Check on the domain in Notra.Limits to keep in mind
trailingSlash: trueredirects/blogto/blog/and the check fails, so leave it off.basePathis prefixed to every rewritesource, so withbasePath: "/app"the rewrites match/app/blog. Use a Vercel or Cloudflare rewrite in front of the app instead.- Security headers: if you set a
Content-Security-Policyfor every route inheaders(), exclude the section paths so it can never replace Notra’s own policy for the site. - Next.js passes Notra’s redirects back to the browser and keeps the
Acceptheader, so Markdown for AI agents works.