What Is a Web Server
A Web Server as a Machine and as Software
What is a web server? The term has two meanings. It can refer to a physical computer that stores websites and makes them available over the internet, or to the software that runs on such a computer and answers requests from browsers. People use the word for both, which often causes confusion.
As hardware, a web server is a computer with processors, memory, storage and a network connection, usually kept in a data center and running around the clock. A single hosting server may hold many sites, which is why the machine itself is often shared. For the wider picture, see what web hosting is.
As software, a web server is a program that listens for HTTP requests on the network. It reads the address that was requested, finds the matching file or passes the request to another program, and sends a response back. Widely used examples include Apache HTTP Server, Nginx and LiteSpeed, which are compared in Apache vs Nginx vs LiteSpeed. The same machine can run different web server software, and the choice affects how sites behave.
How Web Server Software Handles a Request
Every page view involves the same basic sequence inside the server software:
- It receives an HTTP request for a path, such as a page called /about-us.
- It uses the domain name sent with the request to choose the right site. This matters when one machine hosts many sites.
- It returns static files, such as images and stylesheets, directly from disk. For dynamic pages, it hands the request to another program, such as PHP, which builds the page and may query a database.
- It returns a response with a status code. Code 200 means success, and code 404 means the page was not found.
Server software also applies access rules, redirects and security settings. Those settings often determine how a site behaves, which is why the choice of software matters to site owners.
Why the Distinction Matters When Choosing a Host
When a host advertises its web server, it usually means the software and the machine it runs on. A customer with a WordPress site cares most about the software. Does it support the PHP version the site needs? Does it read the .htaccess files used for redirects and access rules? A developer building a custom application may care more about the hardware and how it handles many simultaneous connections. The operating system matters too, as explained in the comparison of Linux and Windows hosting.
Frequently asked questions
Is a web server the same as a web host?
Not quite. A web server is the software or machine that delivers pages. A web host is the company or service that provides and maintains the server for you. A host typically supplies the machine, the server software, the network connection and support, so you do not have to manage them yourself.
Can one web server host many websites?
Yes. Web server software can serve many sites from one machine by matching each request to the domain name it names. This is how shared hosting works. The sites share the machine's resources, so heavy traffic on one site can slow the others.