Skip to main content
This guide forwards 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: true redirects /blog to /blog/ and the check fails, so leave it off.
  • basePath is prefixed to every rewrite source, so with basePath: "/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-Policy for every route in headers(), 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 Accept header, so Markdown for AI agents works.
Last modified on October 8, 2026