How To

How to Add a Blog to an HTML Website in 2026: Hand-Coded Posts or /blog

Add a Blog to an HTML Website
0:00 /
Add a Blog to an HTML Website

You can add a blog to an HTML website in two ways. You can hand-write every post as its own .html file, or you can send one path, yoursite.com/blog, to a managed blog while the rest of your site stays exactly as it is. The first costs nothing and suits a handful of posts. The second takes one config change on your host, and the exact change depends on where your HTML files are served from.

This guide is for a site with no CMS and no build step: HTML and CSS files you wrote or exported, uploaded to a host. To compare every way of adding a blog to any kind of site, start with how to add a blog to an existing website.

Option 1: Hand-write each post as an HTML file

A blog on a static site is a folder of pages plus a page that lists them. You copy your page template, write the post inside it, save it as /blog/my-first-post.html, and add a link to it on /blog/index.html. Your visitors cannot tell the difference, and your host serves the file as fast as any other page.

What changes is the work around each post. A CMS does these jobs on publish. On a hand-coded HTML blog you do them yourself, every time:

JobWhat you do by hand for each post
Blog indexAdd a card or link at the top of /blog/index.html, and split the list into pages once it gets long
RSS feedAdd a new <item> to your feed XML, or readers with feed readers never see the post
SitemapAdd a <url> entry to sitemap.xml with the right date
Meta tagsWrite a unique <title>, meta description, canonical tag and Open Graph tags
Structured dataWrite Article JSON-LD by hand, plus FAQ JSON-LD if the post has questions
ImagesResize, compress and convert each image before upload, and write width, height and alt text
Shared layoutChange the header or footer once, then paste the change into every post file

Each step is small. The cost is that it repeats with every post, and a missed step fails quietly: a post left out of the sitemap still loads, so nobody notices.

A static site generator can automate most of that table, but it means adopting a build step, which is what this kind of site was built without.

When hand-coded HTML posts are enough

Keep writing posts as HTML files if all of these are true:

  1. You plan to publish fewer than one post a month, or a fixed set of pages such as a few case studies.
  2. The person writing the posts is the person who edits the HTML.
  3. The blog is not a traffic channel you are counting on.

Google's own guidance supports the small case. Its sitemap documentation says you might not need a sitemap if your site is "about 500 pages or fewer" and "comprehensively linked internally." Ten posts linked from one index page meet that bar.

Hand-coding stops working when a marketer or outside writer needs to publish without touching files, or when the blog runs on a schedule. At that point, route /blog to a managed platform such as Superblog and keep the HTML site for everything else.

Option 2: Route /blog to Superblog

Superblog is a blogging platform with the editor, blog pages, hosting, CDN and SEO output built in. Your HTML site keeps serving every other page. One rule on your host forwards /blog to Superblog, and the address bar stays on your domain. What that takes off your list:

  • Index, RSS and sitemap: rebuilt on every deploy. Nobody edits XML.
  • Meta and Open Graph tags: set per post in the editor, with a SERP preview before you publish.
  • Structured data: Article, Organization, WebPage and ImageObject JSON-LD on every post, plus FAQ JSON-LD when a post has an FAQ block.
  • Discovery: an IndexNow ping on publish, and an llms.txt index at /blog/llms.txt that points AI assistants to a plain markdown copy of each post.
  • Images: converted to WebP automatically and served from 200+ edge locations, with 90+ Lighthouse performance on every page.

To make the blog look like the rest of your site, paste your existing header and footer HTML under Settings > Menu. Superblog renders it in place of its own header and footer on every blog page.

Subdirectory or subdomain

You have two URL choices. yoursite.com/blog keeps posts on your main domain, which search engines treat as one site. blog.yoursite.com works on any host where you control DNS, with no change to your site at all. The trade-off is covered in subdomain vs subdirectory. On a static HTML site, the host decides which one is open to you:

Where your HTML files liveRoute to /blog
Your own server with nginxA location block
Apache server or VPS you configureA <Location> block in the virtual host
NetlifyTwo rules in netlify.toml or _redirects
VercelTwo rewrites in vercel.json
Any host, with the domain on CloudflareA Cloudflare Worker on the /blog* route
GitHub Pages, shared hosting without proxy modulesblog.yoursite.com (see below)

The Superblog dashboard also has instructions for Render, Firebase Hosting, AWS Amplify, AWS CloudFront and IIS. If your files sit in S3 behind CloudFront, see a blog for S3 static sites.

Before you add any rule: move your old /blog folder

If your site already has a blog/ folder, rename or remove it first. Vercel's docs say "precedence is given to the filesystem prior to rewrites being applied," and Netlify only overrides a real file when the rule is forced. A leftover blog/index.html makes the rule look broken.

In every snippet below, replace yourblog.superblog.click with your blog's Superblog address, shown on the Custom Domain page in the dashboard.

nginx

Add this inside your server { } block, then run nginx -t && nginx -s reload:

location /blog/ {
    rewrite ^(/blog/.+)/$ $1 permanent;
    proxy_ssl_verify off;
    proxy_set_header Host "yourblog.superblog.click";
    proxy_set_header X-Forwarded-Host "";
    proxy_set_header X-Forwarded-For "";
    proxy_set_header Accept-Encoding "";
    proxy_set_header Cookie "";
    proxy_ssl_server_name on;
    proxy_pass https://yourblog.superblog.click/;
    proxy_redirect ~^(http://[^/]+)(/.*)$ https://$http_host$2;
}

Because proxy_pass ends in a URI, nginx replaces the matched /blog/ with /, so /blog/my-post is fetched as /my-post. A bare /blog gets a 301 to /blog/, which is nginx's documented behavior for a proxied prefix location. proxy_ssl_server_name is off by default; the on line sends the hostname the HTTPS origin expects. If your URLs end in a slash, the dashboard prints the matching rewrite variant.

Apache

Enable the modules with sudo a2enmod ssl proxy proxy_http headers, then add this to your site's virtual host and reload Apache:

<VirtualHost *:443>
    ServerName yoursite.com
    SSLProxyEngine on
    <Location "/blog">
        ProxyPass https://yourblog.superblog.click
        ProxyPassReverse https://yourblog.superblog.click
        RequestHeader set X-Forwarded-Host ""
        RequestHeader set X-Forwarded-For ""
        RequestHeader set Accept-Encoding ""
        RequestHeader set Cookie ""
    </Location>
</VirtualHost>

Keep your existing certificate lines in the block. On shared hosting where you only have a .htaccess file, a RewriteRule with the [P] flag needs mod_proxy enabled, and SSLProxyEngine cannot be set in .htaccess. If your host does not let you enable mod_proxy or edit the virtual host, use the Cloudflare Worker route below or blog.yoursite.com.

Netlify

Add these rules to netlify.toml, above any existing redirect rules, then push or redeploy:

[[redirects]]
  from = "/blog"
  to = "https://yourblog.superblog.click/"
  status = 200
  force = true

[[redirects]]
  from = "/blog/*"
  to = "https://yourblog.superblog.click/:splat"
  status = 200
  force = true

A status of 200 makes this a proxy rather than a redirect, and force = true lets the rule win over a file at the same path. With a _redirects file instead, the same rules are two lines in your publish directory (the folder that holds index.html), with ! forcing each rule:

/blog      https://yourblog.superblog.click/        200!
/blog/*    https://yourblog.superblog.click/:splat  200!

Pick one file. Netlify processes _redirects before netlify.toml and uses the first matching rule.

Vercel

Create vercel.json at the root of the project, or add to it, then redeploy:

{
  "rewrites": [
    {
      "source": "/blog",
      "destination": "https://yourblog.superblog.click/"
    },
    {
      "source": "/blog/:path*",
      "destination": "https://yourblog.superblog.click/:path*"
    }
  ]
}

Vercel allows a rewrite destination to be an external URL, so no framework or server code is involved. More on Vercel-hosted sites in adding a blog to a Vercel site.

Cloudflare Worker (any host)

If your host has no rewrite rules, put the domain on Cloudflare's free plan. A Worker forwards /blog and passes every other request to your host:

  1. Add your domain to Cloudflare. Set your site's DNS records to DNS only until your host shows the domain as verified, then switch them to Proxied. Cloudflare's docs say a route only runs on a proxied record.
  2. In Workers & Pages, create a Worker from the Hello World template and name it superblog-proxy.
  3. Click Edit Code, replace everything with the code below, and deploy.
  4. In your domain's Workers Routes, add the route yoursite.com/blog* pointing at superblog-proxy.
  5. Under SSL/TLS > Overview, set the encryption mode to Full.
addEventListener('fetch', event => {
  const url = new URL(event.request.url);

  if (url.pathname === '/blog' || url.pathname.startsWith('/blog/')) {
    event.respondWith(handleBlog(event.request, url));
    return;
  }

  event.respondWith(fetch(event.request));
});

async function handleBlog(request, url) {
  const destinationUrl = new URL(
    url.pathname.replace(/^\/blog/, ''),
    'https://yourblog.superblog.click',
  );

  destinationUrl.search = url.search;

  const proxiedRequest = new Request(destinationUrl.toString(), request);

  return fetch(proxiedRequest);
}

Only blog requests invoke the Worker, because the route matches /blog*. The Workers Free plan allows 100,000 requests a day.

GitHub Pages and shared hosting without proxy modules

GitHub Pages serves HTML, CSS and JavaScript "straight from a repository," and its docs describe no rewrite or proxy setting. Plain shared hosting without mod_proxy is in the same position. Neither can forward /blog on its own.

Use blog.yoursite.com on these hosts. It needs only the DNS records the Superblog dashboard shows. The Cloudflare Worker above can sit in front of shared hosting. GitHub's custom domain docs do not cover a proxy in front of Pages, so treat the Worker route there as untested.

Set it up: the numbered steps

  1. Create a blog at write.superblog.ai. It goes live on a free superblog.click address straight away.
  2. Write or import your first posts. Existing HTML posts can come in one at a time through the editor's Import from file, which creates a draft from each file.
  3. Upgrade to a paid plan. Custom domains and /blog connections are not available on a trial site.
  4. Go to Custom Domain, enter yoursite.com/blog (or blog.yoursite.com), click Connect Domain, and pick your host.
  5. Add the rule for your host from the sections above, or the DNS records the dashboard shows for blog.yoursite.com. For hosts this guide does not cover, follow the dashboard's instructions.
  6. Deploy your blog so it is built for its new address. For a subdomain, wait until the status shows Active first.
  7. Open yoursite.com/blog and check it loads. Allow a few minutes.
  8. Add the sitemap line the Custom Domain page shows to your main site's robots.txt.
  9. If you routed /blog, add a 301 for each old /blog/post-name.html URL under Settings > Advanced > Redirects. If you used blog.yoursite.com, add the 301s on your current host instead, because the old URLs still live there. Then open a few old URLs to confirm they land on the new posts.

If /blog still shows your old page, move the rule above any catch-all rule, clear the cache for /blog, and hard-refresh. More host detail is in subdirectory blog hosting.

What it costs

Pro is $49/month for up to 1,000 posts and 5 team members, with scheduled posts and cookie-free analytics. Super is $99/month for up to 10,000 posts and 10 members, adding multilingual SEO. Every paid plan includes subdirectory hosting, a custom domain, SSL and the CDN. The 7-day free trial needs no credit card and covers writing and setting up the blog before you connect your domain.

The blog stays static too: Superblog prebuilds every post as HTML. The static vs dynamic blog comparison explains why that matters for crawling.

FAQ

Can I add a blog to an HTML website without a CMS?

Yes: write each post as an HTML file and update the index, RSS feed and sitemap by hand.

Do I need to change my HTML site to use yoursite.com/blog?

No. You add one routing rule on your host, or a Cloudflare Worker, and the HTML files stay as they are.

Does GitHub Pages support yoursite.com/blog with an external blog?

No, not on its own. Use blog.yoursite.com.

Will the blog match my site's design?

Yes. Paste your site's header and footer HTML under Settings > Menu.

Can I connect /blog during the free trial?

No. Custom domains and subdirectories need a paid plan.

How long does the /blog setup take?

One routing rule on your host and a deploy. The blog is live at /blog a few minutes after the deploy.

Your blog, without the maintenance

Fast pages, automatic SEO, no plugins to patch. Runs on yoursite.com/blog.

Sai Krishna

Sai Krishna is the Founder and CEO of Superblog. Having built multiple products that scaled to tens of millions of users with only SEO and ASO, Sai Krishna is now building a blogging platform to help others grow organically.

Visit Site X LinkedIn Instagram All Posts →

superblog

Superblog is a blazing fast blogging platform for beautiful reading and writing experiences. Superblog takes care of SEO audits and site optimizations automatically.

Visit Home Page