Skip to content

TechDirectArchive

Hands-on IT, Cloud, Security & DevOps Insights

  • Home
  • About
  • Advertise With US
  • Reviews
  • Contact
  • Toggle search form
Home » AWS/Azure/OpenShift » Deploy a Static Website to Azure Storage from VSCode
  • Screenshot 2020 05 19 at 02.57.10
    Create Central Store for Group Policy Administrative Templates Windows Server
  • Disable BitLocker
    How to Disable BitLocker on Windows 10 Windows
  • images 5 3
    How to uninstall AWS CLI in Windows AWS/Azure/OpenShift
  • screenshot 2020 03 21 at 22.44.04 1
    How to create a Microsoft HyperV checkpoint Virtualization
  • dfggg
    SimpleSAMLphp Setup on Windows Server [Part 1] Windows Server
  • find my device banner
    Video on how to Enable Find My Device on Windows 11 Windows
  • nextcloudfeature 1
    How To Install Nextcloud on a Linux system Backup
  • Configure Multiple IP Addresses on a Single or Multiple Network Cards
    Configure Multiple IP Addresses on a Single or Multiple NICs Network | Monitoring

Deploy a Static Website to Azure Storage from VSCode

Posted on 20/12/202316/10/2025 Imoh Etuk By Imoh Etuk No Comments on Deploy a Static Website to Azure Storage from VSCode
Deploy-static-website-to-azure-blog-storage1

In this guide, I will take you through how to Deploy a Static Website to Azure Storage from VSCode. Visual Studio Code, popularly known as VSCode, is an open-source Integrated Development Environment (IDE) by Microsoft. VSCode is one of the most widely used IDEs by developers around the world. Please see Azure Storage: How to create Blob Storage and upload files, Hosting Static Website and Versioning on AWS S3, and Hosting Static Website and Versioning on AWS S3.

Azure storage serves as versatile storage for various data types, including structured and unstructured content. With Azure Blob Storage, you can easily deploy your static website and share the link anywhere, and anyone can see your website. You can manage your access control.

Learn how to create an Azure Container instance to deploy your image to Azure using Azure CLI. Microsoft Azure is one of the leading public clouds that comes with a pay-as-you-go subscription, spot instance, savings plan, and reserved instance.

Therefore, the need to keep costs under control is important. See how to control cloud costs using an Azure VM. You may also be interested in deploying a Linux virtual machine (VM) on Azure using the Azure CLI.

Azure Storage offers highly available, massively scalable, durable, and secure storage for a variety of data objects in the cloud. Azure Storage data objects are accessible from anywhere in the world over HTTP or HTTPS via a REST API. 

Host a static website on Azure Storage

To host a static website on Azure Storage, you need to use the Azure Storage Blob Service.

A massively scalable object store for text and binary data. It is used to store both structured and unstructured data type.

With the Azure Blob Storage service, you can serve static content such as HTML, CSS, JavaScript, and image files from a storage container usually named $web. Azure Storage Blob Container supports the uploading of batch files.

Azure offers a free option to activate static websites, with costs incurred solely by the storage account. Both data in transit and data at rest in the Azure Storage account are encrypted.

Hosting static websites on Azure Blob Storage doesn’t support configuring headers. It requires additional resources, such as the Azure Content Delivery Network (Azure CDN), for configuring headers.

Prerequisites to Deploy a Static Website to Azure Storage Blob Storage

To deploy a static website to Azure Blob Storage, you’re required to have the following:

  1. An Active Azure Subscription: If you don’t have an active subscription. Sign up for free for 30 days.
  2. Azure Storage account and Visual Studio Code IDE installed on your system.
  3. Azure account with the right privilege to create a storage account.

If you have all the above, proceed to the next section of this guide to learn how to deploy a static website to Azure Blob Storage.

Deploying a Static Website to Azure Blob Storage

To deploy a static website to Azure Blob Storage, we need to first create an Azure Storage account and enable the static website feature for it.

See how to Set a Static IP Address in Windows 11, and how to configure static page in Microsoft Edge browser via Local Group Policy on Windows.

Step 1: Create an Azure Storage Account

To create an Azure Storage Account, sign into the Azure Portal. When in the Azure Portal, search for storage accounts using the horizontal search bar at the top of your browser’s screen.

1-Search-for-Az-Storage
Searching for Azure Storage

When the Storage Accounts dashboard opens up, click on “Create” to create a storage account.

2-Click-on-create
Create a Storage Account

On the basic tab of the Storage Account Creation page, specify the subscription, resource group, storage account name, region, performance, and replication type.

3-supplying-the-details-for-the-storage-account
Entering the details for Storage Account Creation

Click on "Review" and then "Create" on the next screen.

4-Create-Storage-Account
Overview of Storage Account Creation

Please, see Download and update Synology DiskStation NAS to DSM 7.3. Here is how to patch Veeam Backup and replication 12.3.2.3617 to 12.3.2.4165.

Step 2: Enabling Storage Account for Static Website

To enable a storage account for a static website, click on "Go to resource" to navigate to the newly created storage account.

5-Go-to-Resource
Go to the storage account created earlier

From, the overview page of the storage account, locate and click on "Static Website" under Data Management tab. Then, toggle the button to Enabled and click on Save.

6-enabling-storage-account-for-static-websites
Enabling Storage Accounts for Static Website
Noticed from the above, I have specified the index document name and the error document path as index.html and 404.html respectively

Once you enable the storage account for hosting a static website, the $web default container and the primary endpoint will be created, as shown below.

7-default-container-and-endpoint
Showing the default $web container and the primary endpoint

Step 3: Download the template and prepare your code in the VSCode environment.

The next thing to do is to head to Themezy, download the template of your choice, extract it, and then add and open it with the Visual Studio Code application on your local system.

8-Add-the-website-folder-to-the-IDE
Adding the website folder to the VSCode

After adding the website files to VSCode, take time to inspect them and make changes to them as you would prefer.

9-Website-Files
Inspecting the website files

Step 4: Deploy a static website to Azure Blob Storage Container

Let’s inspect the $web container and the storage blob endpoint to see what they look like.

11-Web-Container-is-Currently-empty
12-Testing-the-Endpoint

As we can see from the screenshots above, the $web container is empty, and the endpoint is reporting that “The requested content does not exist.”

Now, let's proceed to deploy the static website from VSCode. 

To do so, right-click on the folder holding your static website content from the VSCode screen and click on "Deploy to Static Website Via Azure Storage".

13-Deploying-Static-Website-To-Azure-Storage
Deploying to a static website via Azure Storage.

Select your subscription.

Note, that the subscription selected here must be the same as the one you used while creating the storage account 
14-Select-your-subscription
Selecting the preferred subscription

Next, select the storage account you created previously and click on it.

15-Select-Storage-Account
Selecting storage account

After deploying the website, you will receive a prompt at the bottom left of the VSCode notifying you that the deployment is complete and pointing you to the primary endpoint.

16-Static-Website-Deployment-Completed
Static Website Deployment Completed

Step 5: Browse to the primary endpoint

To test the deployment, browse to the primary endpoint. In this case, my primary endpoint is https://staticwebsitetechdirect.z13.web.core.windows.net/

17-Browse-to-the-primary-endpoint
Browsing the primary endpoint

Step 6: Verify the website files in $web Container

Navigate to the Azure Portal and click on “Containers” under the Data Storage tab.

18-Open-the-web-container
Checking the $web container files

Next, double-click the $web container to see the static web files, as shown below:

19-Website-files-found-in-the-web-container
Static web files

We have successfully deployed a static website via Azure Storage. You can go ahead to modify the website contents and redeploy the updated content to replace the default web page.

Next Steps [Deploying a Static Website to Azure Storage from VSCode]…

There are a few things I didn’t do. This is because I have already added the Azure Storage extension to my VSCode and authenticated it with my login credentials to Azure.

Note: If you're just getting started with the deployment or just working with Azure Storage directly from Visual Studio Code, you're required to install the Azure Storage Extention and authenticate your credentials to Azure. 

Cleanup Resources

When you are done deploying, don’t forget to clean up resources by deleting the resource group where you deployed the Azure Storage Account.

This helps prevent the charges from Azure. Use the Azure CLI command below to delete the resource group:

az group delete --name <resourceGrouupName> --no-wait
20-delete-resources
Deleting Resource Group

In this post, you have learned how to deploy a static website on Azure Storage directly from your Visual Studio code. In the course of reading this article, you have also learned how to create an Azure Storage account and enable the static website feature for it.

I hope you found the post on how to deploy a static website to Azure storage from VSCode useful. Please feel free to leave a comment below.

5/5 - (1 vote)

Thank you for reading this post. Kindly share it with others.

  • Click to share on X (Opens in new window) X
  • Click to share on Reddit (Opens in new window) Reddit
  • Click to share on LinkedIn (Opens in new window) LinkedIn
  • Click to share on Facebook (Opens in new window) Facebook
  • Click to share on Pinterest (Opens in new window) Pinterest
  • Click to share on Tumblr (Opens in new window) Tumblr
  • Click to share on Telegram (Opens in new window) Telegram
  • Click to share on WhatsApp (Opens in new window) WhatsApp
  • Click to share on Pocket (Opens in new window) Pocket
  • Click to share on Mastodon (Opens in new window) Mastodon
  • Click to share on Bluesky (Opens in new window) Bluesky
  • Click to share on Threads (Opens in new window) Threads
  • Click to share on Nextdoor (Opens in new window) Nextdoor
AWS/Azure/OpenShift Tags:Azure, container, Deploy a static website to Azure Storage, Encryption

Post navigation

Previous Post: Get your free Microsoft 365 E5 Sandbox today
Next Post: How to Enable Time Limit to Disconnect Remote Desktop After Inactivity

Related Posts

  • DevOps GIT Docker Kubernetes
    Azure DevOps: Docker and Kubernetes Deployment with GitHub AWS/Azure/OpenShift
  • IAM AWS
    Creating IAM Users, Adding MFA and Policies on AWS AWS/Azure/OpenShift
  • microsoft azure new logo 2017 e1572843284943
    Pass-Through Authentication: Azure AD Connect Tool status displays inactive AWS/Azure/OpenShift
  • amazon ec2 multiple ips 1
    What to note before assigning Multiple IPs’ to an Instance AWS/Azure/OpenShift
  • Azure Backup Copy 1
    How to Delete Backup Job in Recovery Services Vault AWS/Azure/OpenShift
  • Create S3 Bucket with Terraform
    Create an S3 Bucket with Terraform AWS/Azure/OpenShift

More Related Articles

DevOps GIT Docker Kubernetes Azure DevOps: Docker and Kubernetes Deployment with GitHub AWS/Azure/OpenShift
IAM AWS Creating IAM Users, Adding MFA and Policies on AWS AWS/Azure/OpenShift
microsoft azure new logo 2017 e1572843284943 Pass-Through Authentication: Azure AD Connect Tool status displays inactive AWS/Azure/OpenShift
amazon ec2 multiple ips 1 What to note before assigning Multiple IPs’ to an Instance AWS/Azure/OpenShift
Azure Backup Copy 1 How to Delete Backup Job in Recovery Services Vault AWS/Azure/OpenShift
Create S3 Bucket with Terraform Create an S3 Bucket with Terraform AWS/Azure/OpenShift

Leave a Reply Cancel reply

You must be logged in to post a comment.

Microsoft MVP

VEEAMLEGEND

vexpert-badge-stars-5

Virtual Background

GoogleNews

Categories

veeaam100

sysadmin top30a

  • Screenshot 2020 05 19 at 02.57.10
    Create Central Store for Group Policy Administrative Templates Windows Server
  • Disable BitLocker
    How to Disable BitLocker on Windows 10 Windows
  • images 5 3
    How to uninstall AWS CLI in Windows AWS/Azure/OpenShift
  • screenshot 2020 03 21 at 22.44.04 1
    How to create a Microsoft HyperV checkpoint Virtualization
  • dfggg
    SimpleSAMLphp Setup on Windows Server [Part 1] Windows Server
  • find my device banner
    Video on how to Enable Find My Device on Windows 11 Windows
  • nextcloudfeature 1
    How To Install Nextcloud on a Linux system Backup
  • Configure Multiple IP Addresses on a Single or Multiple Network Cards
    Configure Multiple IP Addresses on a Single or Multiple NICs Network | Monitoring

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 1,839 other subscribers
  • RSS - Posts
  • RSS - Comments
  • About
  • Authors
  • Write for us
  • Advertise with us
  • General Terms and Conditions
  • Privacy policy
  • Feedly
  • Telegram
  • Youtube
  • Facebook
  • Instagram
  • LinkedIn
  • Tumblr
  • Pinterest
  • Twitter
  • mastodon

Tags

AWS Azure Bitlocker Microsoft Windows PowerShell WDS Windows 10 Windows 11 Windows Deployment Services Windows Server 2016

Copyright © 2025 TechDirectArchive

 

Loading Comments...
 

You must be logged in to post a comment.