Create Azure Storage Account
The G2S Website Builder uses Microsoft Azure to host static websites, if we need dynamic content, we use Google Firebase to add the dynamic content to the static site.
Doing it this way means we get a lightning-fast server to run the website on, plus Microsoft handles the security for us, its easy to use and it is also as good as FREE, it costs around 1p to host 3 websites (depending on how much content you have on each website).
The following article explains how to set up your Azure Storage Account to host your static website, This article assumes you have already created your Microsoft Azure account and enabled your Azure Subscription.
Create Storage Account
Log in to the Azure Portal and from the home page click Create a Resource.
Select the storage account option if it is visible if it isn't visible simply search storage account and click Create.
Select a Resource Group or click create new if you don't yet have any. In the example below I have created a new resource group and called it 'default'. Resource groups are used to group Azure services.
On the next page, enter a unique name for the storage account, The name must be unique across all existing storage account names in Azure.
Select the appropriate server location, This isn't massively important as we will be delivering the website to our visitors via Cloudflare's CDN (Content delivery network).
The 'Account Kind' Option MUST be set to 'StorageV2 (general purpose v2).
Click the 'review + create' button.
If everything went well you will see a message saying validation passed, click 'Create'
After a couple of minutes or less, your storage container will be ready, click the 'Go to resources' button.
Click the 'Static website' tab and under Static website, select enabled.
In the Index document name field, enter 'index.html'
In the Error document path, enter '404.html'
Now if go to the Storage Explorer tab and drop down the Blob Containers, you will see a container called '$web', this is the root directory of your website.
Now, go to the Access Keys tab. Here you will see two keys, each key contains a key and a connection string. We are interested in the connection string. Copy the connection string so we can paste it in the G2S Website Builder and allow the G2S access to the storage account.
Now, in the G2S Website Builder within your website, open website settings and add a new domain by clicking the little + button next to the domain dropdown.
Next, in the popup dialogue, enter the domain you will be using with this storage account and click create. Include www. and do not include Hypertext Transfer Protocol (HTTP).
Now paste the access key we copied earlier into the Connection String field and click save.
Now if we click the publish button we will see a slide down progress window, click the publish button to begin the upload. Note that once it's uploaded we will see a visit online button, this button will take you to the domain we entered earlier. We will configure the domain on the next page.
Now if we go back to Azure within our storage account for the website and go to the Storage Explorer tab, drop down the Blob Containers and click the $web container, we will now see our website.
Now we can view the website online even before we configure a custom domain, head over to the Static Website tab and copy the Primary endpoint URL.
Paste the URL in a new tab and you should see your published website. Next, we will configure a custom domain.
Next, we will configure a custom domain.