Oops! No Hosting Plans Match Your Search
You've selected a combination of features that none of the web hosts we profile offer. We suggest you remove your last filter or reset & start again.
Ask Our Experts
Need help with your hosting? Tell us exactly what you are looking for and we’ll do our very best to help. Please allow one working day for a response.
Please fill in all fields.
Thanks! Your request has been sent. We'll reply within 24 hours.
Web Servers - Overview
The computer that your website’s code, database, and files are stored on and delivered from is called a “server.” However, don’t be confused — there also a piece of software sitting on that server which is also called a server. That’s the web server, and it is critical to the functioning of your site. Without the web server, no one would be able to access website.
What is a Web Server?
Most people don’t spend much time thinking about what happens when they visit a website. They click on something and — like magic — it just appears. That’s okay if you’re just a user, but if you are going to run your own website its a good idea to know at least the basic of how this all works. An important piece of that is understanding what the web server does.
When you visit a website, the first thing that happens is that your web browser (Internet Explorer, Chrome, Firefox, Safari, or some other browser) has to figure out where the website you are looking for is — what computer it is actually on. It might know already (because it has recently contacted the same website), or it may need to look up the IP address in the Domain Name System (DNS).
Once it knows where to find the site you are looking for, it sends a request to the server (computer) that manages your site. This request includes the URL of the page you are looking for, along with a bunch of other information, like what type of browser you are using, what your language preferences are, what site sent you there, and a host of other details.
The request is usually not handled directly by a website’s CMS or application code. Instead, it is received by the Web Server. The web server’s purpose is to continually listen for requests form the public internet, and then respond to them properly.
The web server receives the request and then, based on the details of the request and rules set up in the web server’s configuration files, handles the request somehow. Sometimes handing the request simply means retrieving a single static file. Other times it means activating another application and waiting for a response from it.
Once the web server has what it needs to fulfill the request — the contents of a file, the data from its own cache, the output from a separate application — it send that content, along with some additional information, back to the computer that requested it.
Once your own computer has the information it requested, it will display it to you.
The Web Server is Critical
Obviously the web server plays a key part in the process of visiting a website.
Additionally, it is critically important that the web server run as quickly as possible. There are a number of steps in the process from you clicking on a link to the page finally being displayed back to you, and you are expecting it to be nearly instantaneous. Since a certain amount of “travel time” is nearly impossible to avoid, the onus for speed often rests on the web server — especially if the application code is as optimized as possible.
Web Server content caching
One of the ways that a web server can speed up its delivery of content is to cache anything that it may need to deliver often.
Caching means storing in memory. If a web server stores, in active memory, the results of a certain type of request, then it can respond to that request immediately without need to peruse the file system or launch another application.
Caching is especially helpful for speeding up the delivery of content which is technically dynamic (like pages coming out of a CMS) but which actually don’t change very much, and so don’t need to be re-rendered from source code with every request.
Web server configuration — .htaccess
Apache web servers (the most popular type of web server) use files called
.htaccess to store specific instructions on how to respond to particular types of requests. These instructions can include:
- rewriting request details before sending them to secondary applications (
- blocking requests by IP address
- serving different content based on referring website (can be used to prevent hotlinking)
Alternatives to web servers
If you want to run a publicly-available website, you need to have a web server. However, that doesn’t mean you need “stand alone” web server software. Some web applications (like Ruby on Rails) are bundled with web servers, and other applications (like Node.js) include web server functionality as an integral part of their feature set.
Popular web servers
There are a variety of web server types. Some are specific to a single operating system, while others will run on any operating system if the right programming languages are installed. Microsoft has a web server only made for Windows called an Internet Information Services (IIS) server.
Linux has support for a wide array of web servers, but many of those technologies can also be made to run on Windows. One of the most prolific web servers in existence is the Apache web server, which usually is bundled as Linux, Apache, MySQL, PHP (LAMP) which is called a software stack.
Does operating system matter to a web server?
Viewing content on a website doesn't require a user to have the same operating system as the website. However, for the administrator of that website, a web server must be chosen which is supported by the operating system of the computer which the web server is running on.
To make things more confusing, the computer itself is called a "Server" also - so you have web server running on top of the "server" computer. The web server itself is a piece of software, so that software needs to be compatible with the operating system..
How do web servers work?
A computer runs an operating system, on top of that operating system are applications. Usually, a computer also has a network chip which allows input and output with the internet. Sometimes a computer can run a web server as an application. The computer itself has an Internet Protocol (IP) address which is usually assigned by an internet service provider.
When a signal gets sent out to a particular IP Address, or Uniform Resrouce Locator (URL) - which a URL just "redirects" information to an IP address through a Domain Name Server (DNS). So when one computer talks to another one over a network, a communication occurs between two IP addresses (with some redirection in between.)
A web server is the software which interprets that communication and sends back the appropriate information.
What is a Web Port and how are they used?
Every web server runs data packets through a pre-designated "port" which is associated with a computer's network driver. By default, websites most commonly use port 80, and are not seen when browsing to a website. However, a web port can be accessed by typing : and a number.
So if you run a web server on your computer, you can tell it to run at localhost:8080 where 8080 is the port and localhost is the friendly name for a computer's "home" address. Ports are useful for setting up fast data streams, running multiple web servers simultaneously, or for using network protocols for software other than a web browser, such as Skype.
How do I install a web server?
This depends drastically based on the operating system and web server application in question. For a Windows IIS server, sometimes the software comes pre-installed. The same is true of certain Java machines, or Linux machines which might come pre-installed with Apache.
Some web servers can be installed via command line in programming languages/interfaces like Python or NodeJS. Ruby on Rails usually comes with Mongrel or Passenger, almost programming every language will have a most commonly used web server. Each one will require special installation and appreciation of web ports.
Does my web host have web server access?
Every web host in existence has a web server running. The real question is how much control does a user have to configure that web server. Web hosts which run cPanel are running Apache, and they have allotted a portion of a server which can be controlled by the user, but the web server software itself is usually above the reach of the user.
The deepest configuration available is usually access to the .htaccess file - which does allow for fine tuning of URL direction. Not all hosts provide this though, so ask before buying.
Hosting Frequently Asked Questions
How does a web server compare to a data server?
While a web server handles HTTP requests and exchanges documents over the network, a data server takes similar requests, but instead of sending documents, it sends data. Usually, a web server will communicate with a data server to store or retrieve information, rather than allowing the visiting user direct access to the data server.
How does a web server relate to the "cloud?"
For a cloud hosted website, the cloud provider is usually controlling the web server and parts of the web application - unless a the customer is using a "Virtual Server" - which is an emulated computer that exists inside of a higher rooted computer. The term cloud can apply to either a normal web host also, so with any cloud provider, just be sure to know whether you're buying a server, or an application on a server.
What is the difference between a Website and Web Application - and how does it effect a web server?
The line between a website and web application is blurry, but usually a web application is constructed dynamically based on user input. Anytime a website has a user login system, that's an indicator that there is a more complex "application" running at the web address it appears on. Sometimes a web application will talk very closely with the web server, to make sure that when you visit a particular part of the site, certain information related to the user gets sent out to each individual users. So if you were to visit a profile page, the web application would know to send back your profile information
I still don't get it -- what is a Web Server?
For every website in existence, in some form or another, there exists a piece of technology called a "Web Server" - which waits for incoming requests to view a webpage, and in return delivers the content to the web address which first requested the content. Users enter an address or click a link, which sends a request to a web server at that address. Then the web server delivers content to the user's IP address.