Storage Blob Storage complete field-manual-complete field-manual-complete

Static website hosting

Static website hosting lets a storage account serve simple website files directly, without an app server. You enable the feature, upload files such as index.html, CSS, JavaScript, and images into the special $web container, and Azure provides a website endpoint. It is best for public static content, documentation, microsites, and front ends that do not need server-side code. It is not the same as Static Web Apps; it does not provide built-in authentication, managed functions, preview environments, or route-rule features.

Aliases
static-website-hosting, Static website hosting, Azure Storage static website, Blob Storage static website, storage static website, static website endpoint
Difficulty
intermediate
CLI mappings
5
Last verified
2026-05-25

Microsoft Learn

Microsoft Learn describes static website hosting in Azure Storage as a Blob Storage feature that serves HTML, CSS, JavaScript, and image files from a special $web container through a static website endpoint. The feature supports index and error document configuration for public read-only web content.

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

Technical context

In Azure architecture, static website hosting is a Blob Storage data-plane capability configured on a storage account. The control-plane setting enables the website endpoint and defines the index and 404 document names. The site files live as blobs in the $web container, which operators manage through Storage Explorer, Azure CLI, AzCopy, deployment pipelines, or SDKs. The website endpoint is separate from normal blob URLs and is intended for anonymous browser reads. Teams often pair it with Azure Front Door or CDN for custom domain, TLS, caching, and edge-routing requirements.

Why it matters

Static website hosting matters because many web assets do not need a running application platform. A help center, product manual, status microsite, design prototype, or archived campaign can be served from storage with fewer moving parts than App Service or containers. That lowers operational burden and removes server patching, runtime version drift, and compute idle cost. It also forces a useful architecture decision: is this truly public static content, or does it need authentication, API logic, personalized pages, or dynamic routing? Choosing correctly prevents overengineering, but choosing casually can expose content publicly or leave teams without route and auth features they later assume exist.

Where you see it

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

Signal 01

In the storage account Static website blade, where operators enable hosting, set index and error documents, and verify the generated web endpoint before publishing production site files.

Signal 02

In the $web container, where deployed HTML, CSS, JavaScript, images, and downloadable assets appear as blobs with exact case-sensitive names after upload during release validation.

Signal 03

In blob service-properties CLI output, where staticWebsite settings show whether hosting is enabled and which documents browsers receive from the website endpoint for troubleshooting checks.

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 site or release notes page without running App Service, containers, or Functions.
  • Host a disaster-information microsite with static files that can be cached aggressively at the edge.
  • Serve a single-page application build when authentication and backend APIs are handled somewhere else.
  • Archive a campaign, training catalog, or public report site after the dynamic application is retired.
  • Provide a low-cost origin for Azure Front Door or CDN when content is static and publicly readable.

Real-world case studies

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

Case study 01

Maritime museum publishes exhibit archives without servers

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

Scenario

A maritime museum wanted to publish decades of exhibit brochures, maps, and ship photographs after retiring an aging brochure application.

Business/Technical Objectives
  • Serve public archive pages without maintaining a web server.
  • Keep monthly hosting cost below the legacy virtual machine baseline.
  • Preserve direct links used by schools and tourism partners.
  • Give curators a simple process for quarterly content updates.
Solution Using Static website hosting

The cloud engineer enabled static website hosting on a general-purpose storage account and uploaded the generated archive site into the $web container. The build pipeline produced versioned folders, an index document, and a custom 404 page that guided visitors back to exhibit categories. Azure CLI verified blob service properties, listed the deployed files, and captured the website endpoint for the curatorial release checklist. Azure Front Door was added for the public custom domain, TLS, and caching. Curators approved content from a preview artifact before the operator uploaded it to $web, reducing the chance of publishing internal captions or draft metadata.

Results & Business Impact
  • Monthly hosting spend dropped from about $420 to under $55 including edge delivery.
  • The old Windows web server was decommissioned before its next patch cycle.
  • Broken school partner links fell by 92 percent after redirect pages were rebuilt as static files.
  • Quarterly publishing time dropped from two days to three hours with the CLI release checklist.
Key Takeaway for Glossary Readers

Static website hosting is excellent when public content can be built into files and served from a storage origin.

Case study 02

Emergency services agency creates a resilient public guidance site

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

Scenario

A regional emergency services agency needed a public storm-preparation site that could stay available during traffic spikes and office network outages.

Business/Technical Objectives
  • Publish evacuation checklists and shelter maps as static content.
  • Avoid dependence on an internal web server during emergencies.
  • Cache common pages close to residents across the region.
  • Validate every public page before seasonal readiness drills.
Solution Using Static website hosting

The agency rebuilt the guidance site as static HTML, images, and downloadable PDFs, then enabled static website hosting on a storage account dedicated to public communications. Operators uploaded the compiled site to the $web container and used CLI to confirm the index and error document settings before each drill. Azure Front Door provided the public hostname, TLS, WAF policy, and edge caching. The runbook required a browser test of the website endpoint, a Front Door test of the custom domain, and a blob list check for critical shelter-map files. Sensitive internal response plans were kept in a separate private storage account.

Results & Business Impact
  • The site handled a 6.5-times traffic spike during a severe-weather drill without app-server scaling work.
  • Internal-only documents were removed from the release package before upload after a checklist review.
  • Endpoint validation time dropped from 90 minutes to 22 minutes per readiness cycle.
  • Public guidance remained available during a later office VPN outage because no internal server was required.
Key Takeaway for Glossary Readers

A storage-hosted static site can provide simple, resilient public communication when the content truly does not need dynamic logic.

Case study 03

Design consultancy hands off prototypes with a controlled storage origin

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

Scenario

A design consultancy delivered interactive prototypes to enterprise clients but wasted engineering time maintaining short-lived preview servers.

Business/Technical Objectives
  • Host public prototype builds for client review without running compute.
  • Keep each prototype isolated by storage account and cost center.
  • Verify that generated assets were complete before sharing the URL.
  • Retire prototypes quickly after contract acceptance.
Solution Using Static website hosting

The consultancy standardized on Azure Storage static website hosting for prototypes that had no sign-in or backend dependency. A project pipeline built each prototype, scanned the output folder for restricted files, enabled static website hosting, and uploaded assets into $web. Azure CLI captured the website endpoint, listed deployed files, and recorded index document settings in the handoff note. For clients requiring a branded HTTPS hostname, the team placed Front Door in front of the storage origin. Lifecycle tags and budget ownership were applied to the storage account so stale prototypes appeared in monthly cleanup reports.

Results & Business Impact
  • Prototype infrastructure setup time fell from four hours to 30 minutes per client engagement.
  • Compute charges for idle preview servers were eliminated across 37 prototype projects.
  • Three accidental source-map uploads were blocked by the pre-upload scan and checklist.
  • Monthly cleanup found and retired 19 stale prototype origins in the first quarter.
Key Takeaway for Glossary Readers

Static website hosting keeps short-lived public prototypes inexpensive, but only when publishing and cleanup are governed.

Why use Azure CLI for this?

After ten years of Azure engineering, I use Azure CLI for static website hosting because storage website settings are easy to misread in the portal. CLI shows whether the feature is enabled, which index and error documents are configured, and whether the $web container contains the expected files. It also fits cleanly into release scripts: upload the build, verify the service properties, list the deployed files, and capture the endpoint for change records. During incidents, CLI helps distinguish a missing blob from a disabled website setting, a wrong 404 document, or a deployment that targeted the wrong storage account. quickly.

CLI use cases

  • Show blob service properties to verify whether static website hosting is enabled on the storage account.
  • Enable or update the static website index and 404 document names from a deployment script.
  • Upload a generated site build into the $web container during a controlled release pipeline.
  • List $web blobs when troubleshooting missing assets, incorrect file casing, or incomplete deployments.
  • Capture the static website endpoint and configuration as evidence for a production change record.

Before you run CLI

  • Confirm the subscription, resource group, and storage account because website endpoints often look similar across environments.
  • Use Microsoft Entra authorization or a controlled deployment identity instead of casually exposing account keys in scripts.
  • Know whether the command changes public website behavior, especially index and 404 document settings.
  • Verify the build folder contents before upload so secrets, maps, or internal files are not published.
  • Choose JSON output for release evidence and table output for quick operator checks during troubleshooting.

What output tells you

  • Blob service properties show whether static website hosting is enabled and which index or error document names are configured.
  • $web container listings show the actual deployed files, timestamps, content lengths, and names that browser requests must match.
  • Upload output confirms which files were transferred and helps identify skipped, overwritten, or failed deployment assets.
  • Storage account output identifies the location, redundancy, kind, and endpoints that shape reliability and delivery choices.
  • Endpoint values tell you whether testing used the website endpoint instead of a normal blob service URL.

Mapped Azure CLI commands

Storage static website operations

direct
az storage blob service-properties show --account-name <storage-account> --auth-mode login --output json
az storage blob service-propertiesdiscoverStorage
az storage blob service-properties update --account-name <storage-account> --static-website true --index-document index.html --404-document 404.html --auth-mode login
az storage blob service-propertiesconfigureStorage
az storage blob upload-batch --account-name <storage-account> --destination '$web' --source ./dist --auth-mode login
az storage bloboperateStorage
az storage blob list --account-name <storage-account> --container-name '$web' --auth-mode login --output table
az storage blobdiscoverStorage
az storage account show --name <storage-account> --resource-group <resource-group> --query "primaryEndpoints.web" --output tsv
az storage accountdiscoverStorage

Architecture context

Architecturally, static website hosting is a storage-backed publishing pattern, not an application-hosting pattern. I use it when the content is public, static, cheap to host, and easy to redeploy as files. I do not use it when the site needs private user sessions, server-side rendering, role-based route protection, managed APIs, or complex redirects. The storage account becomes both the deployment target and the origin. That means redundancy, account naming, network exposure, lifecycle rules, diagnostics, and front-door integration all matter. A strong design normally adds a delivery layer such as Azure Front Door when custom domains, HTTPS at the edge, caching, WAF controls, or global routing are needed.

Security

Security impact is direct because the static website endpoint serves public content. Do not upload private documents, secrets, environment files, source maps with sensitive details, or internal-only assets into $web. Storage RBAC, account keys, and deployment identities still protect who can change the files, but they do not turn the website endpoint into an authenticated application. Review shared key access, deployment credentials, blob overwrite permissions, and content scanning. If the site needs sign-in, use Static Web Apps, App Service, Front Door with appropriate controls, or another design. Treat the $web container as a public publishing surface and review it before every release.

Cost

Cost impact is usually favorable because static website hosting avoids compute charges. Spend comes from stored data, transactions, redundancy choice, logging, data transfer, and any CDN or Front Door service layered in front. Costs can still surprise teams when large media files, heavy downloads, verbose diagnostics, or cross-region delivery are involved. Lifecycle rules may help remove obsolete build artifacts outside $web, but public site files need deliberate retention and rollback planning. FinOps owners should map the site to a cost center, monitor egress, and decide whether edge caching is a performance feature, a cost-control feature, or both. during reviews. per release.

Reliability

Reliability impact depends on storage account configuration and release discipline. The static website endpoint can be very stable because there is no app process to restart, but broken file uploads still cause outages. Missing index files, incorrect casing, deleted assets, wrong 404 documents, and partial deployments are common failure modes. Choose redundancy based on recovery needs, test the endpoint after upload, and use versioned build artifacts so rollback is quick. If customers depend on the site, consider Front Door, CDN caching, monitoring probes, and controlled deployment steps. Reliable static hosting is simple, but only when file publishing is treated like production release engineering.

Performance

Performance impact is direct for static assets. The storage website endpoint can serve files efficiently, but user experience depends on asset size, cache headers, content types, region placement, browser caching, and any edge delivery layer. Large JavaScript bundles, uncompressed images, and missing cache strategy can make a simple storage-hosted site feel slow. Static hosting also lacks application-side optimization logic, so build pipelines must handle minification, compression strategy, and asset naming. For global audiences, pair the storage origin with Front Door or CDN and measure real-user latency. Performance is usually won before upload, in the build and delivery design. globally. for users.

Operations

Operators inspect static website hosting by checking blob service properties, the $web container, file timestamps, endpoint URLs, diagnostics, and deployment logs. Common tasks include enabling the feature, setting index and 404 documents, uploading a build folder, confirming content types, and validating the endpoint from a browser. Runbooks should document the storage account, source pipeline, rollback package, custom domain path, and who owns public content review. Troubleshooting usually starts with three questions: is the website feature enabled, is the file present with exact casing, and did the browser request the website endpoint rather than the blob endpoint? under pressure. for on-call teams.

Common mistakes

  • Uploading private or internal documents into $web because the team forgot the website endpoint is publicly readable.
  • Testing only the blob endpoint and missing failures that occur on the separate static website endpoint.
  • Breaking links with filename case changes that worked locally but fail against case-sensitive blob names.
  • Expecting built-in authentication, route rules, or managed APIs that belong to Static Web Apps, not storage hosting.
  • Deploying partial build output without validating index.html, assets, and the configured 404 document afterward.