Build and host a static website with Hugo and Google Cloud Storage

WordPress is overkill for 90% of small business websites, especially if they are only every going to ask the web developer to make changes. Static websites used to be just that, static, but now it is possible to create static websites that are simple (relatively) to update dynamically. Hugo is a Golang project that has been built to take static websites to the next level.

It uses a ‘wiki’ style simple markup rather than html, and folder based system to enable content management and has the concept of posts, so can be used as a blog too.

Editing your site is done locally on your PC using your favourite editor or IDE – I tend now to use Atom https://atom.io/

and then it is case of pushing it out to where ever you want to host it. You can host it anywhere really from a shared host, you own sever or wealth of other services – two obvious ones are Amazon Web services S3 and Google Cloud Storage.

Now CNAME only works on sub domains, so you are ok for www.mydomain.com but not mydomain.com. One solution is to set a 301 redirect at your registrar to from the naked a domain to www and cname the www. However if you don’t have that facility CloudFlare allows you to CNAME the naked domain. ( They call it CNAME flattening ), and can also use Cloudflare to redirect the www. to the naked domain, so you have a perfect solution.

So for the moment whilst this work well for a subdomain I can’t see it being viable for a full website.

Create a bucket named the same as your domain (that has been verified with Google), build and copy your site and set access to public, specify the index & 404 file

About Alan

I'm Alan from Fullworks Digital Ltd, where I develop WordPress Plugins and support and manage WordPress websites.

My day job consists of solving clients' WordPress issues and developing new code and solutions.

I started as a professional programmer in 1979 and had been involved with the IT of business technology in virtually every area that exist.

Badlywired.com is my personal blog and my aide memoire of the many interesting facts that I come across. As I spend a lot of time gathering parts of solutions from the internet and assembling them into my own solutions, and also just learning how to do things, this blog is primarily my 'note book' and a way of giving something back to the online community that has helped me extensively.

This site is free to use, but hopes to cover some costs through affiliate income, some products and links are affiliates and may earn the site advertising income.

Some affiliates use Cookies to track if you purchase from them, this allows them to apportion revenue to us you will need to refer to their specific privacy notices as to how you are tracked.

This site is a participant in the Amazon EU Associates Programme, an affiliate advertising programme designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.co.uk.

This website uses cookies to improve your experience. Also when you click on affiliate links those links may use Cookies to track you to be able to apportion revenue to us. We'll assume you're ok with this, but you can opt-out if you wish.AcceptRead More

Privacy & Cookies Policy

Privacy Overview

This website uses cookies to improve your experience while you navigate through the website. Out of these cookies, the cookies that are categorized as necessary are stored on your browser as they are as essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may have an effect on your browsing experience.

This website uses cookies to improve your experience while you navigate through the website. Out of these cookies, the cookies that are categorized as necessary are stored on your browser as they are as essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may have an effect on your browsing experience.

Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.