
#In this post, you’ll see how to set up storage for a public website using Microsoft Azure. This is a simple and straightforward process that allows you to host a static website directly from a storage account.
- In the portal, search for and select Storage accounts.
- Select + Create.
- For resource group **select **new. Give your resource group a name and select OK
Set the Storage account name to publicwebsite. Make sure the storage account name is unique by adding an identifier.
- Take the defaults for other settings.
- Select Review and then Create.
2.This storage requires high availability if there’s a regional outage. Additionally, enable read access to the secondary region,
- In the storage account, in the Data management section, select the Redundancy blade.
-Ensure Read-access Geo-redundant storage is selected.
Review the primary and secondary location information.
3.Information on the public website should be accessible without requiring customers to login.
- In the storage account, in the Settings section, select the** Configuration **blade.
- Ensure the Allow blob anonymous access setting is Enabled.

-Be sure to Save your changes.
3.Create a blob storage container with anonymous read access.
The public website has various images and documents. Create a blob storage container for the content.
-In your storage account, in the Data storage section, select the Containers blade.
- Ensure the Name of the container is public.
Notice that the access is currently set to private, but it needs to be configured for public access.

Customers should be able to view the images without being authenticated. Configure anonymous read access for the public container blobs.
At this stage, the container has been created, but access is still restricted. This means users cannot view files such as images without authentication.
To make the content publicly accessible, anonymous read access needs to be enabled for the container.
The steps below show how to update the access level and allow users to view the files without signing in.
-Select your public container.
![]()
- On the Overview blade, select Change access level.
- Ensure the Public access level is Blob (anonymous read access for blobs only).Click on the dropdown box and select “Blob (anonymous read access)” as the public access level.
- Blob(anonymous read access)” is available.
![]()
we are going to practice uploading files and testing access For testing upload a file to the public container
- Ensure you are viewing your container.
- Select Upload.
- Browse to files and select a file. Browse to a file of your choice.
- Select Upload.
- Close the upload window, Refresh the page and ensure your file was uploaded.
Determine the URL for your uploaded file. Open a browser and test the URL.
- Select your uploaded file
- On the Overview tab, copy the URL.
- Paste the URL into a new browser tab.
- If you have uploaded an image file it will display in the browser. Other file types should be downloaded.


















Top comments (0)