Add a blog to Vercel
Any framework on Vercel can serve a BlogFrame blog at yourcompany.com/blog with a rewrite in vercel.json, or at blog.yourcompany.com with one DNS record.
Vercel hosts sites built with Next.js, Astro, SvelteKit, Nuxt, Vite and plain HTML. Whatever yours is built with, a rewrite in vercel.json forwards /blog to BlogFrame, so the blog sits on your main domain without touching your app's code.
| Address | Example | On Vercel |
|---|---|---|
| Subdomain | blog.yourcompany.com | Every plan, including Free |
| Subfolder | yourcompany.com/blog | Creator and up |
Subdomain
Open your project in the dashboard and enter the subdomain you want, for example blog.yourcompany.com. The dashboard shows the CNAME record to add.
If your domain uses Vercel's nameservers, add the CNAME under the domain in your Vercel dashboard. Otherwise add it at your DNS provider.
Wait for the record to apply. This usually takes a few minutes and can take up to an hour. BlogFrame sets up SSL for you.
Subfolder
Use vercel.json for any framework. On a Next.js app you can put the same rewrite in next.config instead. In your project, enter yourcompany.com/blog under Subfolder on your website. The dashboard shows the rule with your project's real address in place of <your-project>. Add it, deploy, then click Check connection.
Vercel
In vercel.json (any framework on Vercel):
{
"rewrites": [
{ "source": "/blog", "destination": "https://customers.blogframe.app/_p/<your-project>/blog" },
{ "source": "/blog/:path*", "destination": "https://customers.blogframe.app/_p/<your-project>/blog/:path*" }
]
}Merge into your existing vercel.json, then deploy.
Next.js
In next.config.js (or next.config.ts):
async rewrites() {
return [
{ source: "/blog", destination: "https://customers.blogframe.app/_p/<your-project>/blog" },
{ source: "/blog/:path*", destination: "https://customers.blogframe.app/_p/<your-project>/blog/:path*" },
]
},Add this inside your Next.js config, then deploy. Link to the blog with a normal <a> tag rather than <Link>.
Tips for Vercel
- Merge the rewrites into your existing vercel.json rather than replacing the file, then redeploy.
- Preview deployments get the rewrite too, so you can check /blog on a preview URL before going live.
More on addresses: Connect your domain.