It might come as a surprise, but using the internet and, better yet, building the internet is a burden for our climate.

Honestly, as a software developer, even though I hadn’t thought about this too much before, it does make a lot of sense.

It is estimated that billions of websites are running in the internet, and if you think about it, all these billions of websites require energy to run.

Every single time you access internet - be it the Facebook feed, Google Search, Google Maps or your favorite blog, there is a piece of hardware that handles the request and uses energy to deliver documents or content for you.

As developed countries are leading the way to a more sustainable world by taking action on fighting climate change, internet usage needs to be thought about as well.

So, what is there to be done as a webmaster and a website owner to make sure you are doing what is to be done to make the internet more green and sustainable?

Building sustainable and eco-friendly websites

As I started blogging during the 2020 and 2021 pandemic, I thought about what kind of blog I wanted to build in technical terms.

In my previous posts, I have talked about disliking the WordPress ecosystem and going as far as building my own content management system from scratch.

Once I was getting to a point with my content management system where I was finally happy with the outcome and decided to open-source it, I realized that using a content management system was way too much for running just a blog.

I started thinking about ways to get rid of the web server and the database and get back to running a static website.

I wanted to do this because there is almost zero overhead for the maintainability of the website when all there is, is static content. If I were to run a web server and a database, there would always be the possibility of getting hacked and at least being vulnerable to attacks.

At the time, I didn’t even consider that this decision also affected the carbon footprint of my blog and my website, but it is the case.

Getting rid of code bloat

Internet is getting quite bloated as more and more people are being introduced to building and creating websites with bloated ecosystems.

When a website is bloated, there is unnecessary code that is not required to run the website, but the code is loaded anyway.

Getting rid of code bloat is like being introduced to minimalism - you get rid of unnecessary stuff in your life that provides little to no value.

It might seem like nothing to add a small plugin to your WordPress website, but it does bring unnecessary overhead for the website, and every time visitors load a page and have to download code that does nothing, there is wasted energy.

This is usually happening on a tiny scale, like kilobytes, but it keeps adding up as your site grows and gets millions of visits. Over time, you might force visitors to download megabytes and gigabytes of unnecessary data, which, again, requires energy to do so.

It takes conscious efforts to build websites with efficient code coverage and only run code necessary for the end-users.

Getting rid of unnecessary servers and databases

Running a server is like running a printer in a library - every time someone requests a book from the library, the printer prints you a new copy of your asked text. The printer might be old and inefficient and might contain bugs and other security vulnerabilities that could be used for malicious activities.

Suppose your website only serves static documents, and there isn’t heavy reasoning, like lots of business logic, to run a web server then, from a sustainability perspective, it makes more sense to get rid of the webserver.

The same thing goes for databases. If there is no heavy reasoning to run a database, I encourage you to get rid of the database as well.

Texts, headings, links, lists, images, etc., do not require you to run a web server or a database. These types of contents can be wrapped into a single document that can be served to the visitors from buckets or edge servers.

Think of it as getting rid of the printer that always prints the same piece of document for everyone who requests it. Instead, there is one copy of the document, which can be served an infinite amount of times without using unnecessary energy to produce the same document repeatedly.

Moving to static websites from content management systems

A static website is a perfect eco-friendly, lightweight and secure alternative for running a blog or any other kind of website where there is no need for a web server or a database.

Hosting a static website is cheaper than running a dedicated or shared server because fewer resources are needed to serve static content.

Today, there are many great static website generators for building static websites. Some of these are the likes of Hugo, Ghost, and Jekyll.

It also doesn’t take too much coding to build one yourself, which I did with my blog.

It took me less than a weekend to build my own static site generator based on JSON objects.

I wanted to build my own static site generator because I couldn’t find any other JSON-based static site generators. Most of the solutions provided few customization options for my own needs.

Some of my needs were: editing metadata, customizing HTML templates, having complete control over CSS, adding custom JavaScript and JavaScript libraries, etc.

Optimizing website for page speed

When optimizing website speed and performance, developers try to get rid of unnecessary code and libraries or try to minimize them to be more lightweight.

There are many ways website owners can optimize their websites for page speed and performance, such as image optimization, getting rid of code bloat, optimizing DNS, using the cache, etc.

When I first started optimizing my website for page speed and performance, I used Google’s PageSpeed Insights tool to give me tips and hints to improve my page speed score.

Google’s Core Web Vitals is also a great metric to get a good sense of what things are considered essential with page speed for the end-user.

Hosting with renewable energy

Renewable energy hosting, also known as green hosting, means that the service provider hosting your website or service does so in a carbon-neutral way.

This means that all the energy used for running your website or service is either from a renewable energy source or is offset by other carbon-neutral activities.

Google Cloud Platform

As a big Google Cloud advocate, I have closely followed Google’s business decisions regarding its cloud services.

Even though I recently decided to move to Cloudflare, I see Google as a go-to choice for hosting and running cloud services from a sustainability perspective.

Since 2017, Google has matched 100 percent of its global electricity use with renewable energy purchases.

Cloudflare

As I was looking to move my static website away from Google’s premises, I was looking at a few key factors:

  • Best CDN
  • Lowest cost
  • Sustainability outlook
  • Customer service
  • Ease of use

Cloudflare recently rolled out a new feature to their platform called Cloudflare Pages, which I was curious about.

As I was trying to get rid of my Google’s Bucket + Load balancer setup due to its cost, I was mostly weighting between Google Firebase hosting and Cloudflare Pages.

I knew Google Cloud seemed great from the sustainability perspective, but so did Cloudflare.

Google won Cloudflare in terms of best CDN from my perspective, but barely.

Cloudflare, however, beat Google when it came to pricing and ease of use.

Other hosting providers

The Green Web Foundation is a not-for-profit organization that helps people understand the sustainable aspect of running services across the internet.

The Green Web Foundation hosting directory is a list of hosting providers worldwide where you can find providers using renewable energy for running their services.

You can also find a Green Web Checker -tool from the Green Web Foundation website to see if your website or blog is run by renewable energy.

I know mine is.

Miika von Bell Sustainable Website

Running the Green Web Checker -tool on your website gives you a nice little certificate if your website uses renewable energy.

Conclusions

As someone who has worked full-time as a software developer since 2015, I only realized the impact and the importance of sustainability when building my blog during the 2020 pandemic.

It seems like a far-fetched idea that browsing the internet requires quite a bit of energy to get your content in front of your eyes.

I am pretty happy with the changes I have made to my blog from a sustainability perspective, and I am still looking to improve and optimize as time goes on.

Optimizing my website is better for the end-user; it is also suitable for our planet.