Host website for Free

or how I rambled my ramblings

I am not affiliated with any of the companies whose services I am using or have mentioned, nor I am getting paid by the same.

All information on costings is correct at the time of writing this page.

I have evaluated a number of free hosting services and found that many of these services are quite limited e.g.

  • non-paying users get non-encrypted hosting only which nowadays gets lower ranked in search engines or ignored
  • have all kinds of watermarks that can only be removed by getting paid hosting.

Some of the AWS (https://aws.amazon.com/) services are indeed free but to combine them into a totally free working website seemed to be quite a lot of effort namely:

  • you could use DynamoDB for storage (as S3 is only free for the first year), deploying a simple three column table with URL path as the key, and mutually exclusive columns for text and binary content
  • plug in a Lambda function to retrieve from DynamoDB using URL as the key and fetching and returning text or binary content
  • add a CloudFront to route the traffic to Lambda.

Lot of work to avoid paying for a VM or a service. A nice thing with AWS is that you get a free SSL certificate with your website.

Azure offers free static website hosting for personal and hobby (https://azure.microsoft.com/en-us/pricing/details/app-service/static/) and also provides SSL certificate but charges for DNS hosting.

CloudFlare (https://www.cloudflare.com/), on the other hand, offers DNS free hosting.

So, the only cost is purchasing your own DNS domain.

So how…

(did I get to ramble the ramblings?)

Get Hugo

Follow instructions as here: https://gohugo.io/getting-started/quick-start/

Get GitHub Account

Go to: https://github.com/ and create an account.

Check in your website into created account

Find a good tutorial for yourself.

Note: login to github.com using browser and check your website is there.

Get Azure account

Go to: https://azure.microsoft.com/en-us/ and create an account.

Follow Azure Hugo deployment instructions

https://docs.microsoft.com/en-us/azure/static-web-apps/publish-hugo#push-your-application-to-github

Note: from the whole page, follow only the part from the part highligthed in link above.

Test that you see your website on Microsoft provided DNS entry. Do not proceed until it works on that DNS entry.

Follow DNS mapping instructions

From here: https://docs.microsoft.com/en-us/azure/static-web-apps/custom-domain-external

Note: when waiting for DNS propagation, do NOT forget to clear out DNS cache: https://www.wpbeginner.com/wp-tutorials/how-to-clear-your-dns-cache-mac-windows-chrome/ (or else just patiently wait :)).