Storage Storage accounts field-manual-complete field-manual field-manual-complete

Storage static website

Storage static website hosting turns an Azure storage account into a simple public host for static files. You upload HTML, CSS, JavaScript, images, and other client-side assets to the special $web container, then Azure serves them through a web endpoint. There is no server-side code, database runtime, or managed identity sign-in on that endpoint. It is useful for documentation, lightweight portals, downloads, and front ends that call APIs elsewhere. Teams must plan cache behavior, custom domains, HTTPS, deployment automation, and public-read expectations.

Aliases
Azure Storage static website, static website hosting for storage, $web container website, storage website endpoint
Difficulty
intermediate
CLI mappings
5
Last verified
2026-05-26

Microsoft Learn

Azure Storage static website hosting lets a general-purpose v2 or BlockBlobStorage account serve static HTML, CSS, JavaScript, and image files from the special $web container. Operators enable the feature, set index and error documents, and then publish content through the account's web endpoint.

Microsoft Learn: Static website hosting in Azure Storage2026-05-26

Technical context

In Azure architecture, storage static website hosting belongs to Blob Storage on a general-purpose v2 or BlockBlobStorage account. The feature creates a web endpoint and uses the $web container as the document root. Operators configure an index document and optional error document, then deploy static assets by upload, pipeline, or tool. The feature interacts with storage firewalls, public network access, custom domains, Azure CDN or Front Door, cache headers, diagnostic logs, lifecycle rules, and application architectures where APIs, identity, and dynamic processing live outside the storage account.

Why it matters

Storage static website hosting matters because it is a low-friction way to publish static content without running App Service, Functions, Kubernetes, or a web server. That simplicity is powerful, but it can surprise teams that expect built-in authentication, dynamic routing, server-side redirects, or managed certificates on the raw storage endpoint. A storage-hosted site can become a production dependency for product documentation, status pages, SPA shells, or deployment artifacts. Architects need to decide whether the website should be public, fronted by CDN or Front Door, protected by another access layer, or moved to an app platform. Clear decisions avoid accidental anonymous exposure and brittle release workflows.

Where you see it

Signals, screens, and Azure surfaces where this term usually becomes operational.

Signal 01

In the storage account Static website blade, operators enable hosting, set the index document, define the error document, and copy the generated web endpoint before release.

Signal 02

In the $web container, published HTML, JavaScript, CSS, image files, and deployment leftovers show exactly what the anonymous static website endpoint can serve to visitors.

Signal 03

In CDN, Front Door, or DNS configuration, the static website endpoint often appears as the origin behind custom domains, cache rules, and public routing at the edge.

When this becomes relevant

Specific situations where this term helps solve real Azure design, operations, migration, security, reliability, cost, or governance problems.

  • Publish a public documentation or status site without operating a web server or App Service plan.
  • Use Azure Storage as a static origin behind Front Door or CDN for global cache, TLS, and custom domains.
  • Host a single page application shell while APIs run separately in Functions, App Service, or another backend.
  • Create repeatable CI/CD uploads to the $web container with rollback packages for broken front-end releases.
  • Identify whether a static site is acceptable when the requirement includes anonymous public content only.

Real-world case studies

Different enterprise-style examples that show the term being used to hit measurable objectives.

Case study 01

Conservation nonprofit publishes field manuals

Scenario, objectives, solution, measured impact, and takeaway.

Scenario

A conservation nonprofit needed to publish field manuals for volunteers working in areas with unreliable connectivity. Their old documentation site ran on an aging virtual machine that failed during annual wildfire season.

Business/Technical Objectives
  • Serve manuals publicly without maintaining a web server.
  • Publish updated HTML and PDF assets through CI/CD.
  • Reduce page load times for rural volunteers.
  • Keep rollback simple when content edits are wrong.
Solution Using Storage static website

The team enabled static website hosting on a general-purpose v2 storage account and used the $web container as the origin for field manuals, maps, and safety forms. A deployment pipeline uploaded versioned assets and preserved the previous release package for rollback. Azure Front Door sat in front of the storage web endpoint to provide HTTPS, custom domain routing, and edge caching. Operators set cache headers for images and PDFs while keeping the index page easier to refresh. No secrets or protected documents were placed in the site because anonymous access was expected by design.

Results & Business Impact
  • Retired the virtual machine and removed 38 monthly patching tasks.
  • Improved median page load time for rural testers from 4.7 seconds to 1.6 seconds.
  • Reduced documentation release time from two hours to 12 minutes.
  • Rolled back one mistaken safety form update in under five minutes.
Key Takeaway for Glossary Readers

Storage static website hosting is strongest when the requirement is public static content plus disciplined deployment and edge caching.

Case study 02

Robotics startup stabilizes SPA releases

Scenario, objectives, solution, measured impact, and takeaway.

Scenario

A robotics startup shipped a customer portal as a single page application. Releases sometimes failed because JavaScript bundles were uploaded manually and old HTML referenced deleted files.

Business/Technical Objectives
  • Automate uploads to the $web container.
  • Prevent broken asset references during production releases.
  • Keep API services separate from static site hosting.
  • Create evidence for every front-end deployment.
Solution Using Storage static website

Engineers moved the portal shell into storage static website hosting and treated the storage account as a static origin. The CI/CD pipeline uploaded hashed JavaScript, CSS, and image assets first, then replaced index.html only after all referenced files existed. Azure CLI listed $web contents before and after each release, and the pipeline stored those listings with build metadata. The team fronted the site with CDN for caching, while authentication and customer data stayed in API services protected separately. Rollback was a redeploy of the previous index and asset manifest rather than manual portal cleanup.

Results & Business Impact
  • Cut broken front-end releases from five per quarter to zero over two release cycles.
  • Reduced average deployment time from 45 minutes to nine minutes.
  • Lowered portal origin requests by 68 percent after CDN cache tuning.
  • Separated static publishing failures from API incidents in monitoring dashboards.
Key Takeaway for Glossary Readers

A storage-hosted static site works well for SPAs when release order, cache behavior, and backend responsibility are engineered deliberately.

Case study 03

Transit agency separates status page from apps

Scenario, objectives, solution, measured impact, and takeaway.

Scenario

A city transit agency wanted a public disruption page that would stay available when its main rider app was overloaded. The previous status page depended on the same application stack that failed during storms.

Business/Technical Objectives
  • Host a lightweight public status page outside the main app runtime.
  • Let operations staff publish updates through a controlled pipeline.
  • Keep the page reachable through a custom domain.
  • Minimize monthly platform cost for a mostly static workload.
Solution Using Storage static website

Architects enabled storage static website hosting for a dedicated status storage account. The $web container held static HTML, CSS, and a small JavaScript file that read a public JSON status document. Azure Front Door provided the custom domain and HTTPS while the storage account remained the origin. Operations staff updated status content through a reviewed repository rather than direct portal edits. The team tested the page during a simulated rider-app outage and confirmed that it did not rely on the overloaded App Service plan or database used by trip planning.

Results & Business Impact
  • Kept the public status page online during a storm drill with 6x normal traffic.
  • Reduced monthly hosting cost by 81 percent compared with the previous standby web app.
  • Published approved disruption updates in under three minutes.
  • Improved incident communications because riders could still reach a simple independent page.
Key Takeaway for Glossary Readers

Static website hosting can provide a resilient communication channel when it is intentionally decoupled from the application that may be failing.

Why use Azure CLI for this?

I use Azure CLI for static website hosting because the risky parts are small settings that are easy to miss in the portal. CLI can show whether hosting is enabled, what the index and error documents are, and which endpoint Azure generated. It also supports scripted uploads, property changes, and pre-release checks in CI/CD. With CLI, I can compare environments and catch the classic mistake where dev has the right $web content but production points at an old index file. For release evidence, commands and JSON output are cleaner than screenshots and help rollback decisions happen quickly. It keeps publishing repeatable.

CLI use cases

  • Show whether static website hosting is enabled and which index and error documents are configured.
  • Upload a release package to the $web container from a controlled CI/CD pipeline.
  • List $web contents before and after deployment to prove the expected assets were published.
  • Purge or coordinate edge cache updates after changing static website files or origins.

Before you run CLI

  • Confirm the storage account supports static website hosting and that the target environment should be public.
  • Verify the active subscription, account name, $web container target, and deployment source folder.
  • Understand that deleting or overwriting files in $web can break the live public site immediately.
  • Review CDN, Front Door, DNS, and cache settings before assuming the storage endpoint is what users see.

What output tells you

  • staticWebsite.enabled shows whether the account is currently serving a static website endpoint.
  • indexDocument and error404Document show which files the service uses for root and not-found requests.
  • $web blob listings show the exact files available to anonymous visitors through the website endpoint.
  • Endpoint output helps confirm whether DNS or an edge origin points at the correct storage site.

Mapped Azure CLI commands

Storage static website operations

operates
az storage blob service-properties show --account-name <storage-account> --query staticWebsite
az storage blob service-propertiesdiscoverStorage
az storage blob service-properties update --account-name <storage-account> --static-website --index-document index.html --404-document 404.html
az storage blob service-propertiesconfigureStorage
az storage blob upload-batch --account-name <storage-account> --destination '$web' --source <site-folder> --auth-mode login
az storage bloboperateStorage
az storage blob list --account-name <storage-account> --container-name '$web' --auth-mode login
az storage blobdiscoverStorage
az storage blob delete-batch --account-name <storage-account> --source '$web' --pattern <pattern> --auth-mode login
az storage blobremoveStorage

Architecture context

A seasoned Azure architect sees storage static website hosting as a static origin, not a full web application platform. It works well when all server-side behavior is moved to APIs, Functions, App Service, or external services. The storage account provides the origin endpoint and $web container; edge services can add TLS, custom domains, WAF controls, compression, caching, and global acceleration. Deployment pipelines should publish immutable asset versions or clean the container deliberately. The architecture needs a separate identity story because the website endpoint is designed for anonymous file serving. For enterprise workloads, the usual pattern is storage origin plus Front Door or CDN plus API backend.

Security

Security impact is direct because static website hosting serves content anonymously from the $web container. Microsoft Entra ID is not an authentication layer for the storage website endpoint, so private content should not be placed there unless another fronting service controls access. Storage firewalls can restrict the endpoint in supported scenarios, but teams must validate how custom domains, CDN, Front Door, and public network access behave. Secrets should never be baked into JavaScript bundles or configuration files. Security reviews should check deployment credentials, SAS usage, container contents, cache headers, logging, domain ownership, and whether the site exposes internal documentation or build artifacts.

Cost

Cost impact is usually modest compared with a managed web runtime, which is why static website hosting is attractive. Billing still appears through storage capacity, transactions, bandwidth, redundancy, logs, lifecycle retention, and any fronting services such as Azure CDN, Front Door, DNS, or WAF. A popular public site can create meaningful egress and transaction charges, especially if cache headers are poor. Over-retained deployment artifacts in $web also add storage cost. FinOps should review traffic patterns, cache hit ratios, edge service spend, redundancy choice, lifecycle rules for old assets, and whether a tiny site is accidentally carrying enterprise-grade front-door costs. The cheapest origin can still become expensive when edge design is sloppy.

Reliability

Reliability is usually strong for static assets, but the site still depends on storage account availability, DNS, custom domain configuration, certificate or edge service health, and deployment correctness. A bad pipeline can delete the $web container, replace the index document, or publish incompatible JavaScript faster than infrastructure can fail. Geo-redundant storage helps origin resilience only when the application and DNS strategy can use it safely. Reliable designs version assets, keep rollback packages, test 404 and index behavior, monitor availability from outside Azure, and avoid coupling critical status communication to the same failing environment the page reports about. Keep a tested recovery path for content mistakes.

Performance

Performance depends on asset size, caching, network path, and whether the site is fronted by an edge service. The storage website endpoint can serve static files efficiently, but it does not automatically optimize images, bundle JavaScript, compress every asset, or move content close to every user. CDN or Front Door often improves latency and cache offload for global audiences. Poor cache headers can force repeated origin requests, while oversized bundles slow the browser even when storage responds quickly. Performance testing should measure first load, cache reuse, 404 handling, origin latency, edge cache behavior, and API calls made by the static front end.

Operations

Operators manage storage static websites through account properties, the $web container, deployment pipelines, DNS records, and monitoring. Common tasks include enabling or disabling static website hosting, setting index and error documents, listing published files, purging edge caches, checking public access assumptions, and reviewing failed requests. Operations teams also document who owns the site content, which pipeline writes to it, and how rollback works when a release breaks the single page application shell. During incidents, they verify DNS, edge service health, storage availability, object existence, cache state, and whether users are receiving old or newly published assets. Ownership matters because anyone with write access can change the public site.

Common mistakes

  • Publishing secrets, API keys, or internal configuration into JavaScript files served from $web.
  • Expecting Microsoft Entra ID authentication on the raw static website endpoint.
  • Deleting old assets without checking whether cached HTML still references those filenames.
  • Changing custom domains or CDN origins without validating the generated storage web endpoint.