Posted on
November 29th 2024
Tags
How to locate a website ?

In a previous article, we explained that the same server could have a « scope 2 » carbon footprint 10 times higher if it were hosted in the USA rather than in France, because of the differences between the electricity mixes of these 2 countries. This brings us to a question : how can we know where the servers are hosted for the websites we use ?
Locate by IP address
To get to a restaurant, you need to know its postal address. Similarly, to reach a web server, you need to know its Internet address, known as the IP address (Internet Protocol). But then, who decides on the IP address of a server ? The allocation of IP addresses follows a fairly simple administrative process that can be summarized as follows :
- An internationale authority named IANA (Internet Assigned Numbers Authority) is responsible for assigning the various possible addresses to 5 regions of the world, each administrated by a RIR (Regional Internet Registry) as illustrated below ;
- in turn, the RIRs keep a public registry of address allocation to organizations that request them, recording in particular the postal address of their head office. In Europe, the RIR responsible for IP addresses is RIPE NCC (www.ripe.net) ;
- the organization must then take on the administrative role of LIR (Local Internet Registry) to maintain the private registry of addresses received for its activities.

IP addresses are thus distributed by geographical regions, and public registries indicate the country of the organization using these addresses. In most cases, organizations operate in the same country as their head office, so the information contained in public registries is relevant. In other cases, such as for multi-national companies, or for a more precise geolocation than that of the country as a whole, for example to find out the city of the users behind the IP address of an Internet box, it is possible to use specialized databases, known as GeoIP, like maxmind.com.
Therefore, the information of the public registries is generally sufficient to identify the country in which a server is hosted, and thus identify the electricity mix powering a web server to estimate its environmental footprint.
PS : this also explains why government agencies need access to the private databases of organizations such as telecom operators to pinpoint an IP address.
DNS
Since we need to know the IP address of a server to find out its location, the question becomes : how do we know its IP address ? And the answer is : thanks to the DNS. Essentially, the Domain Name System (DNS) acts as a register that associates an IP address with a domain name. Using the DNS, we can learn, for example, that the website www.koevoo.tech is hosted on a server with the IP address : 109.69.190.43.
And in practice ?
In practice, there are several ways to find out where a server is located.
- Command line
The dig command, or nslookup, allow to query the DNS service to translate a domain name into an IP adsress.
NB : here, the option +short allows for a brief and clear answer.
The whois tool can then be used to query the public registries and thus display the information associated with the allocation of an IP address. For a short answer, the output can be filterd on the « country » field to obtain the country of origin.

- Plug-in
Several plug-in allow to find out the country for the websites we visit. These plug-in use the situations and data presented above. One example is Flagfox, for firefox, that displays a flag in the URL bar.

©Cover photo GraphiqaStock, Freepik.
Map of the Regional Internet Regitries : apnic.net
Other posts
Every post >Contact
Let's meet !
Thank you for reading our blog. If you wish to find out more, feel free to contact us.
Koevoo needs the contact details you provide to contact you about our products and services. You can unsubscribe from these communications at any time. See our Privacy Policy to learn more about how to unsubscribe, our privacy policies and our commitment to privacy.