How to run websites at almost zero monthly cost
This is a post explaining about how I almost run my websites at zero cost and also capture some analytics on the user clicks. There would be other ways to do it, this is what I have found so far, so this is just purely my experiences and journey with web so far.
Simple Architecture
Well, I am not an expert in UI or Frontend development, I just use some free templates existing on internet and understand a little on what is being done and then go about making some customisations to my webpages and improvise when I find better alternatives.
GoDaddy - My domain (jwconsult.in
) provider. It was around 2020 I registered my domain with domains.google.com and has been just playing around with it and not publishing anything on it. Later, google decided to retire their domains service and GoDaddy was reasonably cost effective.
Google Domains charged me around INR 720 and GoDaddy was around the same with one free year after migration. This would be your only recurring yearly cost for holding a domain name.
Web Frameworks - I was playing around with starting from scratch templates on Angular and was trying to design a landing page for my webpage where I wanted to have some top menus and my content below with cards of what my website is going to provide (which was not much at that time). I did not made much progress since UI being an area that I am so bad, cause I don't know how to provide user experience. While googling I found few templates on react that were almost reflecting on what I wanted to showcase. I picked a template and started making some changes and was able to arrive at a single page app which can be a start.
Hosting - Since my domain was on google, I did not find any options of free hosting the single page app, so I found an option to create a Static Website Hosting (GCP Cloud Storage
) which was similar to AWS S3 bucket static website hosting. Finally my webpage was live with my website hosted on GCP Cloud Storage and it was a great feeling when you can show this to others that I now own a website :) But only caveat, it was running on http://
I don't want others to come to my website which first displays, it's not secure to use this site. I was looking for ways to do this (of course free), I could not do it through GCP, as it asked me to create a Load Balancer and Certificates which would cost me few dollars.
While using storage bucket, the bill on my GCP Account was less than 1 INR monthly (costs me for storing and egress cost on buckets)
Cloudflare - I bumped into Cloudflare which can frontend my cloud storage bucket and expose it to users through https:// and I was still paying my GCP bill just for my www
sub-domain which was running my react webpage hosted on GCP bucket.
Now I had the idea to develop some documentation docs
which was inline with the workshops that I planned to run for my website and can help people revisit it post the workshops. I had couple of options, print the contents and provide with spiral binding or host it on the web, refer during workshops and reach more people. Later, seemed to fit since it's scalable and flexible and I can update contents whenever I wanted. Found vitepress
was a good options since it wraps the documentation from Markdown format to a presentable UI using vite and I was quickly able to learn and create contents.
I need to deploy this on another GCP bucket, but I did not want to pay the cost of storage and egress. I found Cloudflare provide the option to host web page in its own service pages
Pages - This supported many web frameworks and was satisfying my requirements and offered me a no cost way of hosting websites. I deployed my docs
site on this service and did not face any issues. Also, it had integration with GitHub
which was a bonus point for me, now I can just test the changes in local and once I commit the changes, Pages can build and deploy the updated content to my sub-domain. Later, I migrated the www
site also to Cloudflare pages and retired my GCP Storage bucket.
I am not paying anything on the web pages that I host on Pages and Cloudflare is running end-to-end TLS on my domains.
HashNode - I came across this blogging service recently while seeing someone else blog post which was hosted on Hashnode and decided to give a try. They also supported a custom domain feature so came blog
sub-domain. I started writing posts about my top skill which is on API Management
and also supported the Markdown support, hence it became a good choice for me personally.
Google Analytics - So, now I have three sub-domains www
docs
blog
running at absolutely zero cost. But, one thing which was missing, where are my users coming from and how much of users are coming into my site after I publish some posts. This was just a curious questions as people just hit like on your posts but does not really traverse into the content. Analytics service from google was also easy to use and there were instructions on how to do it on my static websites. I plugged in and starting to see the analytics on my users and again at zero cost.
If you are just starting up and does not have a domain name or not planning to use any domain, you can still use the services I mentioned but it will be of the domain names provided by them eg., pages service will provide a URL when you publish a website on them, which can help you validate it.
If you do not own a domain name then you can run all these at absolutely 0 costs.
Thanks for reading and would like to see what else is out there which can help run websites at almost zero costs. Feel free to comment or share your opinions.
You can also reach out to me for any clarifications regarding any of above tools via LinkedIn
About JWConsult
I started this as one of workshop for a college where I am an Alumni, where I introduced the concept of Cloud Computing and DevOps, made it interactive with some advanced presentation tools and hands-on demos. People loved the content and that motivated me to see if I can reach others who are trying to learn and get hands-on experience. You can find more information on the below pages,
Subscribe to my newsletter
Read articles from John Williams directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
John Williams
John Williams
I have been an API guy since the beginning of my career and have gathered a great insight on the usage and design of APIs