Setup guide
Yes: three rewrites in next.config.js plus skipTrailingSlashRedirect: true. Without that flag, Next strips the trailing slash from /blog/hello-world/, the blog adds it back, and visitors hit a redirect loop. It works wherever Next.js runs as a server, Vercel included. A static export can't rewrite at all.
next.config.js (.mjs and .ts take the same object)next start, Vercel, Netlify, a container. Not output: 'export'next build && next start, against our live edge, 2026-10-14acme.com/blog/hello-world/sites.amplifysignal.com/b/acme.com/hello-world/acme.com/blog/, with canonical tags and links to matchIn AmplifySignal, open Settings → Blog address, enter https://acme.com/blog and save. Your blog keeps serving at our address until the check in step 4 passes.
module.exports = {
skipTrailingSlashRedirect: true,
async rewrites() {
return {
beforeFiles: [
{ source: "/blog", destination: "https://sites.amplifysignal.com/b/acme.com/" },
{ source: "/blog/:path*/", destination: "https://sites.amplifysignal.com/b/acme.com/:path*/" },
{ source: "/blog/:path*", destination: "https://sites.amplifysignal.com/b/acme.com/:path*" },
],
};
},
};Why it looks like this:
beforeFiles runs before Next checks its own pages and public files, so an old app/blog or pages/blog route can't shadow the proxy. Delete that folder anyway so nobody edits a page no one can see.:path* doesn't carry a trailing slash into the destination, so /blog/:path*/ spells it out; Next's own docs use the same pattern.rss.xml, sitemap.xml, the article images.skipTrailingSlashRedirect stops Next from 308-redirecting /blog/hello-world/ to the slashless URL before the rewrite ever runs.Rewrites are read at build time, so deploy the way you always do. Locally, restart next dev to pick them up.
Three requests from any terminal show whether the rule works before you press anything:
curl -sI https://acme.com/blog/ | head -1
# HTTP/2 200
curl -s https://acme.com/blog/_verify.json
# {"edge":true,"host":"acme.com","service":"amplifysignal"}
curl -sI https://acme.com/blog/<an-article>/ | head -1
# HTTP/2 200A 301 on the article that points at the same URL, again and again, means something on the way is dropping the trailing slash. "edge":false means the rule points at amplifysignal.com instead of sites.amplifysignal.com.
Then press Check in Settings → Blog address, or run as site blog-check acme.com. Check fetches /_verify.json through your address and passes when it answers for this site through our edge. From then on, links, canonical tags, the sitemap and the RSS feed use your address, and the old /b/ links redirect to it.
skipTrailingSlashRedirect. We reproduced the loop: Next answers /blog/hello-world/ with a 308 to /blog/hello-world, the blog answers that with a 301 back, and the browser stops with ERR_TOO_MANY_REDIRECTS.trailingSlash: true instead. It changes every URL on your site, and with plain :path* rules it still looped in our test.amplifysignal.com/b/…. Use sites.amplifysignal.com. Once your address is verified, our main domain redirects visitors back to acme.com/blog, and the proxy follows them in a circle.output: 'export' there is no server to rewrite. Put the rules on whatever serves the files (the Netlify, Cloudflare or nginx guides) or use a subdomain.Yes. Next stops normalizing slashes everywhere, so /about and /about/ both answer 200. If that bothers you, a proxy.js at the project root (called middleware.js, exporting middleware, before Next 16) puts the cleanup back everywhere except /blog:
import { NextResponse } from "next/server";
// skipTrailingSlashRedirect turns Next's slash cleanup off everywhere; put it back outside /blog.
export function proxy(request) {
const url = new URL(request.url);
if (url.pathname.length > 1 && url.pathname.endsWith("/") && !url.pathname.startsWith("/blog/")) {
url.pathname = url.pathname.slice(0, -1);
return NextResponse.redirect(url, 308);
}
}We ran it on 16.4.1: /about/ redirects to /about, blog URLs keep their slash.
No. Vercel runs the rewrites in next.config.js; use this guide, not the Vercel one. Keeping the rules in Next's config also means next start anywhere else behaves the same.
Yes. rewrites() is the same in both routers, and beforeFiles overrides a pages/blog route just as it does app/blog.
Same object, exported with export default instead of module.exports. In TypeScript, type it as NextConfig from next.
sites.amplifysignal.com is our edge: a request there tells us it came through your proxy, so we serve the page as yours. Once your address is verified, amplifysignal.com redirects a blog's visitors to your address instead, so a proxy aimed there would send people in a circle. Check names the problem if a rule points at the wrong one.
The mechanics carry over: swap the destination for any server that hosts your blog under a path. Copy two things along with them. Keep the trailing slash if that server's URLs end in one, and make sure its links and canonical tags name your address, or search engines index the other host instead. Ours switch the moment Check passes.
Yes, on any platform: one CNAME from blog to sites.amplifysignal.com, and we issue the certificate. A folder shares your main domain's authority, which is why these guides lead with it; the subdomain steps are on the overview.
Checked against the platform's documentation on 2026-10-14; where the facts above say tested, we ran the snippet ourselves against the servers that host our own blog and followed every URL to a 200.
AmplifySignal hosts it, drafts the articles from your keywords and Search Console data, publishes them on a schedule and sends the social posts. Every account starts with a free week, or begin with a free 90-day launch plan.