In this blog, we are going to learn how to create a storage account for a public website and we are going to configure simple settings in the storage account but before we go deeper, it is important to understand what a storage account is and what a public website is.
What is a storage account? A storage account is a digital space in the cloud for keeping and managing data .
What is a public website? A public website is a website that is open to the general public. It is a website that can be accessed by members of the general public, it can be accessed by anyone with internet connection without needing an authentication or password.
Now, let us learn how to create a storage account.
1.In the Microsoft Azure portal, search and select "storage account"
2.Select +create
3.It will bring you to the Basics tab. In this place, we are going to learn another way to create a Resource group. Now, select "Create new" give your Resource group a name and select ok
Leave others as default
4.Select Review+create
5.Wait for the storage account to validate, after it has validated, click "create"
6.Wait for it to deploy then click "Go to resource"
7.To ensure high availability incase of regional outage, enable read access to the secondary region.
In the storage account, in the storage account, in the data management section, select the redundancy blade
8.Click the dropdown icon and select "Read access Geo redundant Storage"
9.Information on the public website should be accessible without requiring customers to log in.
in the storage account, in the settings section, select the configuration blade and enable "Allow blob anonymous access" and then save your changes
How To Create A Blob Storage Container With Anonymous Read Access
10.In your storage account, in the data storage section, select the containers blade.
11.Select +Add container
12.Give your container a name and click "create"
13.Customers should be able to view the images without being authenticated. So we are going to configure "Anonymous read access" for the public. Select your public container
14.On the overview page, select "change access level"
15.Make sure the public access level is Blob (anonymous read access for blobs only) then select ok
Practice Uploading Files And Testing Access
For testing, upload a file to the public container, the type of file does not matter a small image is ok.
16.Ensure you are viewing your container now. Select upload, click browse to files and double click on an image you would like to upload, then click upload
You have successfully uploaded an image into the cloud.
How do you know you have uploaded a file?
- Select the uploaded file
18.Copy the URL of the image and place it in a browser to see the image you have uploaded.
*Configure soft delete *
19.It is important that the website's documents can be restored if the are deleted. Configure blob soft delete for 21 days.
Now, go to the overview page of your container, click on it and click
enabled (7 days)
- You can see that soft delete has been enabled with the ticked blue box. Now change the 7 to 21, you can also do the same thing for containers and click save
21.If something gets deleted, you need to practice using soft delete to restore it.
Go to your container where the file was uploaded, select the file you uploaded and then select delete.
22.Click delete
We have successfully deleted the file that was uploaded, now let us learn how to recover it.
How to undelete
Come to the left side of your screen and click the dropdown icon and select "show active and deleted blobs"
Now, click the ellipses by the right side of your screen to undelete the file.
How to enable versioning
From the overview page, Go to blob service and enable versioning and save
Thanks so much for reading.
I believe you now know how to create a storage account that support public website, how to upload a file to the cloud, how to configure soft delete, how to undelete and how to enable versioning.
Do not forget to share, like, and drop a comment. See you in my next blog.


























Top comments (0)