You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/storage/blobs/storage-blob-static-website.md
+11-10Lines changed: 11 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,30 +6,31 @@ ms.service: azure-blob-storage
6
6
ms.topic: how-to
7
7
ms.author: shaas
8
8
ms.reviewer: dineshm
9
-
ms.date: 11/21/2024
10
-
ms.custom:
9
+
ms.date: 02/12/2025
11
10
---
12
11
13
12
# Static website hosting in Azure Storage
14
13
15
-
You can serve static content (HTML, CSS, JavaScript, and image files) directly from a storage container named *$web*. Hosting your content in Azure Storage enables you to use serverless architectures that include [Azure Functions](../../azure-functions/functions-overview.md) and other Platform as a service (PaaS) services. Azure Storage static website hosting is a great option in cases where you don't require a web server to render content.
14
+
Azure Blob Storage is ideal for storing large amounts of unstructured data such as text, images, and videos. Because blob storage also provides static website hosting support, it's a great option in cases where you don't require a web server to render content. Although you're limited to hosting static content such as HTML, CSS, JavaScript, and image files, you can use serverless architectures including [Azure Functions](../../azure-functions/functions-overview.md) and other Platform as a service (PaaS) services.
16
15
17
16
[!INCLUDE [static websites vs static web apps](../../../includes/storage-blob-static-website-vs-static-web-app.md)]
18
17
19
18
If you need a web server to render content, you can use [Azure App Service](https://azure.microsoft.com/services/app-service/).
20
19
21
20
## Setting up a static website
22
21
23
-
Static website hosting is a feature that you have to enable on the storage account.
22
+
Static website hosting functionality is configured within a storage account and isn't enabled by default. To enable static website hosting, select a storage account. In the left navigation pane, select **Static website** from the **Data management** group, and then select **Enabled**. Provide a name for your *Index document name*. You can optionally provide a path to a custom 404 page. Finally, select **Save** to save your configuration changes.
24
23
25
-
To enable staticwebsite hosting, select the name of your default file, and then optionally provide a path to a custom 404 page. If a blob storage container named **$web** doesn't already exist in the account, one is created for you. Add the files of your site to this container.
24
+
:::image type="content" source="media/storage-blob-static-website/storage-blob-static-website-enable-sml.png" alt-text="Screenshot showing the locations used to enable static website hosting on a storage account." lightbox="media/storage-blob-static-website/storage-blob-static-website-enable-lrg.png":::
26
25
27
-
For step-by-step guidance, see [Host a static website in Azure Storage](storage-blob-static-website-how-to.md).
26
+
A blob storage container named **$web** is created for you within the storage account if it doesn't already exist. Add your website's files to the **$web** container to make them accessible through the static website's primary endpoint.
28
27
29
-

28
+
:::image type="content" source="media/storage-blob-static-website/storage-blob-static-website-blob-container-sml.png" alt-text="Screenshot showing how to enable static website hosting on a storage account using a blob storage container." lightbox="media/storage-blob-static-website/storage-blob-static-website-blob-container-lrg.png":::
30
29
31
30
Files in the **$web** container are case-sensitive, served through anonymous access requests and are available only through read operations.
32
31
32
+
For step-by-step guidance, see [Host a static website in Azure Storage](storage-blob-static-website-how-to.md).
33
+
33
34
## Uploading content
34
35
35
36
You can use any of these tools to upload content to the **$web** container:
@@ -46,7 +47,7 @@ You can use any of these tools to upload content to the **$web** container:
46
47
47
48
Users can view site content from a browser by using the public URL of the website. You can find the URL by using the Azure portal, Azure CLI, or PowerShell. See [Find the website URL](storage-blob-static-website-how-to.md#portal-find-url).
48
49
49
-
The index document that you specify when you enable static website hosting appears when users open the site and don't specify a specific file (For example: `https://contosoblobaccount.z22.web.core.windows.net`).
50
+
The index document that you specify when you enable static website hosting appears when users open the site and don't specify a specific file (For example: `https://contosostaticsite.z22.web.core.windows.net`).
50
51
51
52
If the server returns a 404 error, and you haven't specified an error document when you enabled the website, then a default 404 page is returned to the user.
52
53
@@ -63,9 +64,9 @@ You can modify the anonymous access level of the **$web** container, but making
63
64
64
65
While the primary static website endpoint isn't affected, a change to the anonymous access level does impact the primary blob service endpoint.
65
66
66
-
For example, if you change the anonymous access level of the **$web** container from **Private (no anonymous access)** to **Blob (anonymous read access for blobs only)**, then the level of anonymous access to the primary static website endpoint `https://contosoblobaccount.z22.web.core.windows.net/index.html` doesn't change.
67
+
For example, if you change the anonymous access level of the **$web** container from **Private (no anonymous access)** to **Blob (anonymous read access for blobs only)**, then the level of anonymous access to the primary static website endpoint `https://contosostaticsite.z22.web.core.windows.net/index.html` doesn't change.
67
68
68
-
However, anonymous access to the primary blob service endpoint `https://contosoblobaccount.blob.core.windows.net/$web/index.html` does change, enabling users to open that file by using either of these two endpoints.
69
+
However, anonymous access to the primary blob service endpoint `https://contosostaticsite.blob.core.windows.net/$web/index.html` does change, enabling users to open that file by using either of these two endpoints.
69
70
70
71
Disabling anonymous access on a storage account by using the [anonymous access setting](anonymous-read-access-prevent.md#set-the-storage-accounts-allowblobpublicaccess-property-to-false) of the storage account doesn't affect static websites that are hosted in that storage account. For more information, see [Remediate anonymous read access to blob data (Azure Resource Manager deployments)](anonymous-read-access-prevent.md).
0 commit comments