Date: 21.3.2025
In this blog post, I’ll show you how I set up a completely free CDN—because honestly, I don’t feel like paying just to deliver a few files. This method isn’t something I’d recommend for production use, especially not for businesses, as there could be licensing concerns. But hey, I’m ignoring my own advice and doing it anyway.
Take this website as an example. Most of it is static and lightweight, but some images are frustratingly slow to load. A CDN (Content Delivery Network) solves this by moving your assets closer to the user. My server is in Europe, so visitors from the U.S. experience slower load times simply due to distance. A CDN caches your files across various global locations, so users can download them from a nearby server—resulting in much faster access.
So who would offer a fast, globally distributed CDN for free? Enter: Microsoft—via GitHub.
GitHub, to serve repositories quickly worldwide, has built its own robust CDN. Any public files in your GitHub repo are distributed through it. Best of all: it’s completely free (unless you count giving Microsoft your soul—err, data).
To use it, just create a public GitHub repository and upload your large files—images, videos, etc. Then link to them in your website like you would any other external asset. GitHub handles the rest.
You can check out my example repo here, which I use as the CDN for this site.
Hope this makes your site faster, easier to manage, and cheaper to run.
GitHub GitLab Twitter Reddit LinkedIn
#FreePalestine #SlavaUkraini