At The Green Web Foundation, we get a fair few people asking us “how can I improve the sustainability of my website?”. In this series – A beginners guide to performing a website carbon audit – we set out to help folks get started along the path to answering that very question.
In this post (part one of the series), we’ll look at assessing the carbon emissions of website hosting. In parts two and three we’ll cover data transfer, and device energy usage respectively. You can find links to the other parts below:
- Part 1 – Hosting (this post)
- Part 2 – Data transfer (coming soon)
- Part 3 – Devices (coming soon)
Before starting, it’s worth noting that this series of posts is aimed at people/organisations looking to start understanding the carbon emission impact of their websites. They will help website owners uncover potential areas for improvement on their sites. They will not, however, be providing detailed carbon emission estimates based on actual usage, lifecycle analysis, or other measures that might be required for corporate reporting.
Introduction to hosting
Choosing a green web host for a website is one of the most impactful decisions any website owner can make. Based on peer-reviewed research, the Sustainable Web Design model says hosting accounts for 15% of a website’s total energy usage. Beyond making your own site more sustainable, it also sends a message to other hosting providers that their potential customers value services that are powered by renewable energy.
Checking how a site is hosted is also as good a place as any to start a website audit. For this audit, we’ll use the COP27 website (https://cop27.eg
). Let’s get started.
Check if a site is on a green web host
The first thing we’ll do is check if the website uses a verified green hosting provider known green web host (or CDN – more on that later). At The Green Web Foundation, we maintain an open dataset of verified providers. We’ve also created a few user-friendly ways for people to check websites against that dataset.
Using the Green Web Checker online
One way to check a website against our dataset is to use the Green Web Checker tool online. Running the COP27 domain (https://cop27.eg
) through this tool reveals that the site is not hosted on a known green providers or CDN.
Using the Greencheck API
For developers, or those looking to automate green hosting checks, we’ve also created the Greencheck API. You can use this API to check a single domain. Below is how we can use this API to check the COP27 domain.
curl -X 'GET' \\
'<https://api.thegreenwebfoundation.org/api/v3/greencheck/cop27.eg>' \\
-H 'accept: application/json'
This returns the below response.
{
"green": false,
"url": "cop27.eg",
"data": false
}
With this, we can check for the green
key to know if a site is hosted on a green web host (true
) or not (false
). For green hosted sites, the API also returns additional information about the hosting provider.
Check if a CDN is being used
Using a Content Delivery Network (CDN) to serve static assets to website users is considered best practice in both the website performance and digital sustainability spaces. CDNs allow for long-lived content (like images, CSS, JS, and even entire HTML pages) to be duplicated and stored in multiple locations around the globe.
When a user visits a website that uses a CDN, these static assets can then be served to the user from a location that is probably closer to where they are compared to the original website host. This results in it using less network resource, and by doing so contributes to reducing the network energy required to view a site.
Using CDN Finder
The quickest way to check if a website is using a CDN is to run the domain through CDN Planet’s free CDN Finder tool. Checking the cop27.org
domain reveals that the domain isn’t served from a CDN.
The result also shows us the host IP address. Given that no CDN is used, this bit of information is very useful. With it, we can check where in the world the website is hosted. From that, we can begin to get an idea of how sustainable that hosting is by considering the energy grid in that geographical region.
First you need to get the region. To do that click on the IP address in the CDN Finder results. This takes us to the IP Location website, which brings up information about the IP address. Then you need to find information about the carbon intensity* of that region’s energy grid. To get carbon intensity data easily, you can use our IP to CO2 Intensity API, which we go into below.
What is carbon intensity?
Carbon intensity is a way of measuring how clean electricity is, or more precisely how much CO2 is emitted by producing a unit of electricity. The electricity that powers a grid comes from a variety of sources such as renewables, fossil fuel based or nuclear. We call this the fuel mix. And it’s this fuel mix that influences the carbon intensity of unit of energy.
Annual average emissions intensity reflects the fuel mix of an entire electricity grid over a year. You’ll see average intensity used in the majority of carbon reporting standards and tooling.
The team at Electricity Maps have written this great blog post explaining average emissions, and their counterpart marginal emissions.
Using the IP to CO2 Intensity API
The IP to CO2 Intensity API is a free, public API we’ve developed at The Green Web Foundation to address this exact use case. Pass it a public IP address, and it will return the country in which that address is located. Importantly, it also returns the annual average carbon intensity of that country’s electricity grid and the percentage of electricity generated by fossil fuels.
Let’s use the COP27 IP address above (163.121.141.38
) and see what we get back. Running the script below:
curl -X 'GET' \\
'<https://api.thegreenwebfoundation.org/api/v3/ip-to-co2intensity/163.121.141.38>' \\
-H 'accept: application/json'
Returns the following information:
{
"country_name": "Egypt",
"country_code_iso_2": "EG",
"country_code_iso_3": "EGY",
"carbon_intensity_type": "avg",
"carbon_intensity": 466.006,
"generation_from_fossil": 88.87,
"year": 2021,
"checked_ip": "163.121.141.38"
}
Reading these results
The website is hosted in Egypt. Since it doesn’t use a CDN, every time someone visits the website the host in Egypt is being hit. The information from the IP to CO2 Intensity API tells us that last year (2021) Egypt’s grid:
- Had an average carbon intensity of 466 grams per kilowatt-hour (g/kWh).
- Nearly 89% of electricity generation in the year came from fossil fuels.
For reference, that’s slightly more than the global average grid intensity (442 g/kWh) and much more than the global average fossil fuel generation (61.56%). These figures, like those returned by the API, come from Ember. You can use their Data Explorer if you want to compare the grid intensity data or fossil fuel generation of different countries.
Summing up
So, what have we learnt about how this site is hosted?
- It’s not hosted on a known verified green hosting provider.
- It does not use a CDN.
- It’s hosted in Egypt.
- Egypt’s annual average grid intensity in 2021 was 466 g/kWh.
- 88.87% of Egypt’s energy generation in 2021 was from fossil fuels.
Putting these together, we could come up with recommendations based on the following themes:
- Look to use a CDN for the site.
- If using a CDN is not possible, then:
- Take steps to use a verified green hosting provider.
- Assess hosting options and try to pick hosts in regions that use more renewable energy.
Acknowledging what we don’t know
In our assessment, we’re limited to general, publicly available data. There are a variety of reasons why websites might not show up as “green” when checked against our Green Web Dataset. In some cases, we might not have data about a hosting provider or website. If that is the case, we encourage web hosts to register with us.