Step 1. Setup your Azure Storage Account
Step 2. Enable Static Website
- $web container is where your static website files will be uploaded
click on it if you want to use Storage Explorer to upload your content
- Primary and secondary endpoints to access your website
When you configure your storage account for static website hosting, the website can be accessed via this region-specific web endpoint. It is different from the blob storage endpoint which you use to upload new content.
Step 3. Upload content using embedded Storage Explorer
Next, we will use a very simple index.html to be the entry point of our static website:
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>Title of the document</title> </head> <body> Hello from Azure Storage static website hosting! </body> </html>
To upload the file, one option is to use the embedded Storage Explorer option from the left side menu.
Step 4. Use custom domain for your Static Website
You can also setup your custom domain to access your website without having to use either the primary or the secondary endpoint url.
To do so, select the Custom domain option from the left side menu
and proceed with one of the following two methods:
- Create a CNAME record with your DNS provider that points from your domain to staticdemo.blob.core.windows.net or staticdemo.z6.web.core.windows.ne
- Create a CNAME record with your DNS provider that points from the “asverify” subdomain (like asverify.www.contoso.com) to asverify.staticdemo.blob.core.windows.net or asverify.staticdemo.z6.web.core.windows.net. After this step is completed, you can create a CNAME record that points to staticdemo.blob.core.windows.net or staticdemo.z6.web.core.windows.net.