What is web hosting?

A website is a set of files and usually a database. Hosting is the computer that keeps them online and answers every visitor’s request, all day, every day.

2โ€“3 minutes
Front panels of rack-mounted servers

A website is a folder of files (pages, images, code) and, for most sites, a database. For anyone to see it, those files have to live on a computer that is switched on all the time, connected to the internet, and ready to answer requests. That computer is a server, and renting space or time on one is web hosting.

Web hosting is renting part (or all) of a server that stores your website and sends it to visitors’ browsers. You pay a host for the hardware, power, network and, depending on the plan, the upkeep.

What happens when someone visits your site

  1. They type your domain, such as example.com, or click a link.
  2. Their computer asks DNS which IP address that domain points to. See how DNS works.
  3. Their browser connects to the server at that address and asks for the page.
  4. The server’s web software (Nginx, Apache or LiteSpeed) reads the files, runs any code such as PHP, fetches data from the database, and sends back the result.
  5. The browser draws the page. Images, styles and scripts each arrive as further requests.

Hosting is everything on the server side of steps 3 and 4.

What a host actually provides

  • Hardware: processors, memory and storage in a data center.
  • Network: a fast connection and one or more IP addresses.
  • Power and cooling: backup power so a grid failure does not take sites offline.
  • Software: an operating system and web server, often a control panel such as cPanel.
  • Upkeep, on some plans: security updates, backups and monitoring.

Hosting is not the same as your domain

Your domain name is registered separately, with a registrar, even when the same company sells both. The domain is the address; hosting is the building. You can move hosting without changing your domain, and you can point a domain at any host by editing its DNS records. That separation is what makes moving to a new host possible.

The main types

TypeIn one line
SharedYour site shares a server with many others; the host runs everything
VPSA private virtual machine with guaranteed resources; you or the host manage it
DedicatedA whole physical server for you alone
CloudVirtual servers rented by the hour and resized on demand

The differences are covered in shared, VPS, dedicated or cloud.

Do you need hosting at all?

Not always. Website builders and blogging platforms bundle hosting into one subscription, and static sites (plain HTML with no database) can be served free from several platforms. You need your own hosting when you want full control of the software, run something like WordPress yourself, or host email and applications alongside the site.

Something out of date? Software changes. If a step no longer works, tell us and we will check it and update the page.