How do Web Servers Work?
Despite the surge of internet use in the last decade, with some of the most popular websites receiving thousands of clicks per hour, many users actually don’t know how a website works. We have witnessed the evolution of websites in recent years and have seen a completely different world of amazing effects and different variations of programming languages.
The technology behind a website is the same for every site: they are all hosted on web servers. A web server is a server that works by returning files (HTML, PHP etc.) in response to client requests (browsers) over http or https (secure connections).
There are many different web servers on the market however the most commonly used servers are currently Apache and Microsoft IIS.
The basic process is the initial request from your browser to the server. Let’s say you search for www.eltoma-global.com/index.htm
The browser breaks the URL down into three parts:
- The protocol (“http”).
- The server name (“www.eltoma-global.com”).
- The file name (“index.htm”).
The browser communicates with a name server to translate the server name “www.eltoma-global.com” into an IP Address, which it then uses to connect to the server machine. The browser then forms a connection to the server at that particular IP address on port 80 (the default port of web servers).
Following the HTTP protocol, the browser sends a GET request to the server, asking for the file “http://www.eltoma-global.com/index.htm.” (Note that cookies may also be sent from the browser to the server with the GET request).
The server then sends the HTML text for the Web page to the browser (again, cookies may also be sent along with the text). The browser then read the HTML tags and formats the page for the users screen.
It may seem to be a simple process, however when you consider that potentially thousands of packets can exchanged between the client and web server, this can become an extremely complicated operation from the initial request to the final end product which is presented in the form of a website on your computers screen.