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

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.

  • Share on X (Opens in new window) X
  • Share on Reddit (Opens in new window) Reddit
  • Share on LinkedIn (Opens in new window) LinkedIn
  • Share on Facebook (Opens in new window) Facebook
  • Share on Pinterest (Opens in new window) Pinterest
  • Share on Tumblr (Opens in new window) Tumblr
  • Share on Telegram (Opens in new window) Telegram
  • Share on WhatsApp (Opens in new window) WhatsApp
  • Share on Mastodon (Opens in new window) Mastodon
  • Share on Bluesky (Opens in new window) Bluesky
  • Share on Threads (Opens in new window) Threads
  • 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

  • Angular Azure
    How to deploy your Angular App to Azure from Visual Studio Code AWS/Azure/OpenShift
  • FEATUREDC
    How to create Confidential VMs in Azure AWS/Azure/OpenShift
  • create a new Azure SQL Database
    How to create a new Azure SQL Database [PaaS] AWS/Azure/OpenShift
  • Webp.net resizeimage 3 1
    How To Configure VM Update Management on Azure Stack Hub AWS/Azure/OpenShift
  • featuredimage
    Create App Service Resource with Azure CLI AWS/Azure/OpenShift
  • Deploy to ACI
    Create Azure Container instance to deploy your image to Azure using Azure CLI AWS/Azure/OpenShift

More Related Articles

Angular Azure How to deploy your Angular App to Azure from Visual Studio Code AWS/Azure/OpenShift
FEATUREDC How to create Confidential VMs in Azure AWS/Azure/OpenShift
create a new Azure SQL Database How to create a new Azure SQL Database [PaaS] AWS/Azure/OpenShift
Webp.net resizeimage 3 1 How To Configure VM Update Management on Azure Stack Hub AWS/Azure/OpenShift
featuredimage Create App Service Resource with Azure CLI AWS/Azure/OpenShift
Deploy to ACI Create Azure Container instance to deploy your image to Azure using Azure CLI 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

  • Active Directory with IPMI for Out of Band Management
    Integrate Active Directory with IPMI for Out-of-Band Management Backup
  • feature photo quit vim
    How to Exit Linux Vim or Vi Editor Linux
  • Veeam Plugin update for Proxmox
    Update Veeam Backup for Proxmox Plugin to support PVE 9.0 Backup
  • term “git” was not used as the name of a cmdlet, function, script file, or executable Program recognised
    The term “git” was not used as the name of a cmdlet, function, script file, or executable Program recognized Version Control System
  • 2019computers windows 10 window on blue background 131108 29
    This installation package could not be opened: Verify that the package exists and that you can access it Windows
  • Schedule and join Teams Meeting
    How to schedule and join meetings with Microsoft Teams JIRA|Confluence|Apps
  • veeaamAgent1
    Veeam Agent Vulnerability: Fix Veeam Agent vulnerability for Microsoft Windows  Backup
  • Building VPC
    Build a Scalable VPC for Your AWS Environment [Part 1] AWS/Azure/OpenShift

Subscribe to Blog via Email

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

Join 1,824 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

Active Directory AWS Azure Bitlocker Microsoft Windows PowerShell WDS Windows 10 Windows 11 Windows Server 2016

Copyright © 2025 TechDirectArchive

 

Loading Comments...
 

You must be logged in to post a comment.