This website stores cookies. Click here to accept them.cookie information page

What is a web server?

4th December 2011
Categories: basics, web servers

If you've taken the journey through our technical blog from the beginning, you'll have an understanding of what HTML is and how to use it to build websites. We haven't yet covered how web pages get from A to B on the internet, so that's our next topic.

If you try out some of the HTML and CSS we've discussed and save it in a text file called webpage.html (make sure it's a text-only file, so use notepad or dreamweaver, or your favourite equivalent) then you will be able to double-click that file on your desktop (or wherever you've saved it) to see the resulting web page.

At this stage in the life of your HTML file, nobody but you can access it. It's a web page, therefore, but it's not part of the internet.

In order for this web page to become part of the internet, it doesn't just need to be on a computer connected to the internet. It also needs a web server, a computer whose purpose is to serve web pages to other computers. Web servers are usually Linux or Windows machines (there aren't very many Mac ones) with a program running all the time (also called a web server, confusingly) which listens for new requests and decides what to do with them.

For the web server software to be able to receive any requests on a domain name like, it doesn't just need to be connected to the internet; your browser needs to associate it with that domain name. This job cannot be completed on the server itself; you need to add entries to something called the DNS system. You can do this via a domain name registrar (in other words, the people who sell domain names, 123-reg and sitelutions being examples).

Once you've hooked up the doman name with the address of the web server (the so-called "IP" address), a process with which the domain name registrars will help you, your web server will start receiving requests - now it just needs to process them.

Web servers need to know where the web pages live (they won't look all over the computer; they need to start from a particular folder - that's called the web root), and they also need to know a bit about how you want to process different file types. For example, your HTML file might just be sent as-is to the user requesting it, for their browser to display. Other files, like PHP, may include instructions (lines of code) for the web server to process first - including receiving input, calculating, and fetching content from different places.

The web server processes whatever it needs to process, calling on other software (like the PHP interpreter) in the process, and finally serves up your web page. If your web page refers to other files (like a css file or image files, for example), the browser will make another request to the web server, and the web server will go through the request processing again and serve up another file. 

Add your comment for "What is a web server?":

© Alberon Ltd 2018

8 Standingford House
26 Cave Street

01865 596 144

Oxford Web is a trading name of Alberon Ltd, registered company no. 5765707 (England & Wales).