CDN for Hugo
Hugo is fast to build. Make it fast to fetch as well.
Hugo emits static HTML, but readers still wait if that HTML and media live in one region.
Use the Hugo public/ directory as a Cloud CDN origin. Cache pages and assets globally and purge on each rebuild.
Why teams use Aptranet
What CDN for Hugo looks like on this network.
Cloud CDN caches and accelerates eligible content on 210+ points of presence, with Origin Shield when the origin must stay out of the way.
Docs and blogs at the edge
Hugo HTML is served from 210+ locations with 30 ms average latency.
Media next to the article
Images and downloads are cached; optional transforms avoid extra Hugo pipelines.
Rebuild, then purge
CI can invalidate HTML so editorial updates are not stuck behind TTL.
How to set it up
A cutover you can validate before DNS moves.
Create the Cloud CDN configuration, prove it on an Aptranet hostname, then point production DNS when the path looks correct.
- 1Publish public/ to an origin
Any HTTPS static origin is enough for Cloud CDN to pull.
- 2Cache HTML and assets
Long TTL for fingerprinted files, purgeable TTL for HTML.
- 3Add purge to the Hugo pipeline
After hugo, purge changed sections or the whole HTML tree.
- 4Map the documentation or blog domain
Attach TLS and cut over DNS.
Outcomes
What changes once the hostname is on Aptranet.
- Hugo sites are cached worldwide
- Rebuilds can purge immediately
- Images are delivered from the edge
- The origin only answers misses
Keep reading
Related pages
More CDN use cases on the same Cloud CDN footprint.
Frequently Asked Questions
Yes, if Cloud CDN can pull it over HTTPS. The CDN hostname becomes the public site.
Cache each language path separately and purge the language prefix on rebuild.
Yes. Hugo docs sites are a common static origin for Cloud CDN. See also CDN for documentation.
Cloud CDN supports Brotli and Gzip for eligible text assets.
