Azure CDN (Classic) was retired, Azure Front Door took its place, and a previously cheap static blog
started generating 30€+ per month.
This article describes how a Hexo-based static blog was migrated from Azure Storage + Front Door to Azure Static Web Apps (Free Tier) — including GitHub Actions, custom domain, redirects, and a custom 404 page — ending up with zero ongoing hosting cost again.
This article builds on two earlier posts:
The original setup was:
That setup worked reliably for a long time and is not repeated here in detail.
When Azure CDN (Classic) was deprecated, Azure offered an automatic migration to Azure Front Door.
Functionally, the migration was transparent:
Financially, it was not.
Azure Front Door is a powerful enterprise product (global routing, WAF, rules engine), but for a personal site it is massive overkill. After noticing invoices of 30€+ per month, it became clear that this setup was no longer acceptable, at least not for my humble purposes.
So, the goal was
Host a static Hexo blog on Azure with custom domain and HTTPS for zero ongoing cost.
graph LR
User[Browser] --> SWA["Azure Static Web Apps - Free Tier"]
SWA --> CDN["Global CDN - included"]
What should disappear entirely:
Azure Static Web Apps (SWA) fits this use case particularly well:
No separate CDN.
No Front Door.
No certificate management.
No billing surprises.
The most important design decision was simple:
Change as little as possible in the existing workflow.
The Hexo build already worked perfectly.
Only the deployment target needed to change.
In the Azure Portal, create a new Static Web App:
Hexo already produces static output in the public/ directory.
There is no reason to let Azure rebuild anything.
Key changes:
public/ directory1 | - name: Deploy to Azure Static Web Apps |
The blog is served from a subdomain:
blog.example.dev
Azure provides a CNAME target:
1 | CNAME blog <random>.azurestaticapps.net |
Azure Static Web Apps supports custom error handling via staticwebapp.config.json. The file needs to live in the projects root.
1 | { |
Done by a simple delete of all obsolete elements in the Azure Resource Group. The only remaining element is the Static Web App.
Replacing Azure Front Door with Azure Static Web Apps reduced complexity, removed operational overhead, and brought hosting costs back to zero.
And don’t get me wrong, this is not a rant, but I would have preferred to get warned about upcoming costs of an automatic migration.