Skip to Content
BlogFrameBlogFrame

Add a blog to Next.js

Put an AI-written, SEO-ready blog at yourcompany.com/blog on a Next.js site with one rewrite in next.config. No CMS to build, no MDX to maintain.

A blog inside a Next.js app usually means picking a CMS, building list and post pages, and wiring up sitemaps and metadata yourself. With BlogFrame you add one rewrite to next.config and yourcompany.com/blog is a finished blog: written, hosted and kept up to date for you, while your app stays as it is.

AddressExampleOn Next.js
Subdomainblog.yourcompany.comEvery plan, including Free
Subfolderyourcompany.com/blogCreator 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.

No DNS change is needed for a subfolder. For a subdomain, add the record wherever your domain's DNS is managed (Vercel, Cloudflare or your registrar).

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

The rewrite works wherever your Next.js app runs: Vercel, Netlify, your own server or a container. 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.

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 Next.js

  • Link to the blog with a plain <a href="/blog"> rather than <Link>: the blog isn't part of your app's routes, so a full page load is what you want.
  • If your app already has a /blog route, remove it or pick another folder such as /resources.

More on addresses: Connect your domain.