How does the world wide web, or internet, actually work? This question is very important in the world of today with the internet being an integral part of most of our lives. Learning about such a large and important service may seem daunting, however, the internet is actually fairly simple.
Websites are stored on dedicated computers called web servers. Each of these computers have an Internet Protocol (IP) address – an identifying number unique to each computer – like phone numbers. To further explain IP addresses, they are comprised of a set of four numbers separated by periods each set up to three numbers long. There are two different scopes of IPs: public, and local. Public IP addresses are assigned by the Internet Service Provider (ISP) and can be used for accessing a your web server remotely from a different network. If you would like to find out your public IP, simply Google “Public IP.” However, this does require opening a port in your router which is covered in another article (coming soon). To learn how to use port forwarding now, Google “port forwarding.” Remember, it is not a good idea to give your public IP to people whom you do not trust, as it would allow them to access any services you have set up to use port forwarding. A local IP address only allows you to access websites and other services running on your home computers without additional setup.
When you enter the IP of a computer running web server software, the webpages stored on that web server are shown. However, while this works for local connections most large websites (i.e. Google) allow their site to be accessed only through a domain name (i.e. Google.com) rather than just typing the IP. You can test this by opening your browser and entering 126.96.36.199 – Google’s main IP. A directory of domain names are stored on special servers called Domain Name System (DNS) servers, which essentially contain a series of entries linking an IP (i.e. 188.8.131.52) to a domain name (i.e. Google.com). Also, DNS servers can link to other DNS servers allowing the map to be extended even further.
When data is transfered over the internet a unit called packets is used. Originally, computers simply transmitted data as a bitstream. However, packets allow the data to be better controlled and also increase the speed at which data can be transferred.
Pulling it Together
You open your web browser and type in a domain name – but what really happens? From the information we covered above, we can understand that there is actually quite an interesting process that happens from the time you type in a domain name until the web page is displayed. First, your computer sends a request to the DNS servers for the IP relative to the entered domain name. Once your computer has recieved the web server IP address it can contact the actual webserver itself and request the specific page. On the backend of the web server, websites are stored in files using different web languages such as HTML and CSS. These files are then sent to your computer, which in turn converts the file into the readable websites that we know today.