DEV Community

Cover image for HOST A STATIC WEBSITE ON AZURE BLOB STORAGE IN 5 MINUTES (No VMs)
daniel ugot
daniel ugot

Posted on

HOST A STATIC WEBSITE ON AZURE BLOB STORAGE IN 5 MINUTES (No VMs)

Have you ever wanted to put up a website without worrying about managing a web server, paying for hosting or wrestling with some complex configurations? There's good news: Azure Storage can host a static website for almost nothing, and you can get your hands on it.

In this blog post, I will tell you exactly what a static website is, I will introduce you to Azure Storage and its different types and tell you why Blob storage is a really good fit, and then walk you through the steps to get your static website hosted.

Are you ready......

Let's get started!!!

WHAT IS A STATIC WEBSITE

A static website is a collection of fixed files -HTML, CSS, JavaScript and images - that your browser downloads and displays exactly as they are. Every visitor to the site gets to see the same content, and no database or server-side code is running behind the scenes.

A good example includes Business Brochures, Documentation and Knowledge Bases, Landing Pages, and Personal Portfolios.

Because static sites are just files, they load really fast and are very secure (there is no database to hack), and can be hosted on simple storage services like the Azure Blob Storage.

AZURE STORAGE - THE CLOUD HARD DRIVE

Azure Storage is Microsoft's cloud service for storing all kinds of data. When you create a storage account, you get a suite of services, each built to handle a specific type of data storage task. Here's a simple breakdown of each:

🚀 Blob Storage: Handles unstructured data - images, website files, videos, backups

🚀 Azure files: Handles Cloud file shares

🚀 Azure Tables: A NoSQL Key-value store for semi-structured data.

🚀 Azure Queues: Message queuing for decoupling app components.

WHAT IS AZURE BLOB STORAGE

Blob stands for Binary Large Object. It’s designed to store massive amounts of unstructured data – think of it as a giant, super‑reliable folder in the cloud. Within Blob Storage, you create containers (like folders) and upload blobs (your files).

Blobs come in three flavours:

✅ Block blobs – ideal for text and media files (perfect for websites)

✅ Page blobs – used for virtual machine disks

✅ Append blobs – optimised for logging

For a static site, you’ll use block blobs.

Why Azure Blob Storage Is a Great Fit for Static Websites

You might wonder, “Why not just use a traditional web host?” Here’s what makes Blob Storage special for static sites:

🎯 No server to manage – You don’t install, patch, or secure any operating system or web server software.

🎯 Incredibly low cost – You pay only for the storage your files use and the requests they generate. The static website feature is free to enable.

🎯 Built‑in HTTPS – Azure gives you a *.web.core.windows.net URL with an automatic SSL certificate, so your site is secure from the start.

🎯 Global scale – Azure’s infrastructure is massive. If your site goes viral, Blob Storage handles the traffic without breaking a sweat.

🎯 99.9%+ durability – Microsoft automatically replicates your files to protect against hardware failure.

🎯 Easy custom domains – You can map your own domain (like
www.your-site.com) to the Azure endpoint.

⚠️ One small limitation: Because there’s no web server, you cannot run server‑side code (PHP, Node.js, etc.). If you need authentication or custom headers, look at Azure Static Web Apps – a more powerful (but still serverless) option.


STEP BY STEP WALK THROUGH: HOST A STATIC WEBSITE ON AZURE BLOB STORAGE


STEP ONE - Create a Storage Account in Azure

1️⃣ Sign in to your Azure Portal

2️⃣ In the search bar, type in Storage Account and click on it in the drop-down suggestion.

3️⃣ Inside the Storage centre, click on Create to create an Azure blob storage

4️⃣ Fill in the basics

🔲 Resource group: Create a new resource group by clicking on create new and providing your resource group name.

🔲 Storage account name: Must be globally unique -try mynewstaticsite (lowercase letters and numbers only)

🔲 Region: Pick one close to your audience

🔲 Preferred Storage type: Azure Blob Storage or Azure Data Lake Storage.

🔲 Performance: Standard (perfect for a static site)

🔲 Redundancy: Locally redundant storage (LRS)

5️⃣ Click Review + Create and then Create

Deployment takes a few seconds. Once it is done, click Go to Resource


STEP TWO - ENABLE STATIC WEBSITE HOSTING

1️⃣ In your storage account's left menu, under Data Management, click Static Website

2️⃣ Set Static website hosting to Enabled

3️⃣ Enter:
🔘 Index document name: index.html (this is your home page)
🔘 Error document path: 404.html

4️⃣ Click Save above

After saving, Azure automatically creates a special container named $web – this is where all your website files will live. Azure also shows you a Primary endpoint URL like
https://yourstorageaccount.z22.web.core.windows.net/ – it’s your site’s address.


STEP THREEDownload a Free Template from Tooplate.com

1️⃣ Go to Tooplate.com and browse the free templates. For this example, I’ll use “2137_barista_cafe”

2️⃣Click the Download button to get a ZIP file.

3️⃣ Extract the ZIP on your computer. You’ll see folders like css, js, images and an index.html file.


STEP FOURUpload Your Template Files to the $web Container

1️⃣ In your storage account, go to Containers (under Data storage).

2️⃣ Click on the $web container to open it.

3️⃣ Click the Upload button to add the content of the static website to the $web container

4️⃣ Drag the extracted files and folders from your computer into the upload window, or click to browse.

5️⃣ After the upload completes, you should see all your files inside $web


STEP FIVETest Your Live Website

1️⃣ Go back to the Static website page in your storage account.

2️⃣ Click the Primary endpoint URL (or paste it into your browser).

3️⃣ Congratulations – your Tooplate template is now live on the internet, served directly from Azure Blob Storage!

You’ll see the beautiful, responsive website just like it looks on your computer.


Now you can give this a try. Pick a template you love, upload it to Azure Blob Storage, and share your new site with the world.

If you encounter any issues, please drop a comment – I’ll be happy to help.

Happy hosting! 🚀

Top comments (0)