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.

4–6 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 DNSDNS The internet’s phone book. It turns a name people can remember, like example.com, into the number address computers use to find the server. More about 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 (NginxNginx A fast, popular program that sends web pages to visitors and can pass requests on to apps behind it. More about 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 addressesIP address The number address of a device on the internet, like 203.0.113.10. Computers use it to find each other, the way post uses street addresses. More about IP address →.
  • Power and cooling: backup power so a grid failure does not take sites offline.
  • Software: an operating system and web serverWeb server The program that answers visitors’ browsers and sends them your website. Also used for the computer it runs on. More about Web server →, often a control panel such as cPanel.
  • Upkeep, on some plans: security updates, backups and monitoring.

What runs on a web server

A typical server runs a small stack of software, each layer doing one job. You will see these names on hosting plans and in error messages.

LayerCommon choicesIts job
Operating systemUbuntu, Debian, AlmaLinux, Rocky LinuxRuns everything else; almost all web servers use Linux
Web serverNginx, Apache, LiteSpeedReceives requests and sends back files
Language runtimePHP (through PHP-FPM), Node.js, PythonRuns the site’s code to build each page
DatabaseMySQL, MariaDB, PostgreSQLStores posts, users, orders and settings
Control panel (optional)cPanel, Plesk, DirectAdminA web interface for managing sites, email and DNS

WordPress, for example, needs a web server, PHP and MySQL or MariaDB. A static site needs only the web server. When something breaks, knowing which layer failed is most of the diagnosis: a 502 Bad Gateway means the web server could not reach PHP, while Error establishing a database connection means PHP could not reach the database.

Hosting is not the same as your domain

Your domain name is registered separately, with a registrarDomain registrar The company you buy and renew your domain name from, and where you choose who handles its settings. More about Domain 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.

Terms you will see on a hosting plan

  • Storage is disk space for files, databases and email. Most small sites use under 5 GB. The type matters more than the size: NVMe and SSD are much faster than HDD.
  • BandwidthBandwidth How much data your website is allowed to send to visitors each month. Every page view uses a little; images and video use the most. More about Bandwidth → or transfer is the data sent to visitors each month. A page of about 2 MB viewed 10,000 times uses about 20 GB.
  • InodesInode A count of files and folders. Many hosting plans limit how many you can have, even when they offer “unlimited” space. More about Inode → are the number of files allowed. Shared plans often cap them at a few hundred thousand, which email and cacheCache A saved copy of something, kept so it does not have to be made or fetched again. Like keeping a printed copy instead of reprinting it for every person who asks. More about Cache → folders can fill faster than you expect.
  • CPU and memory limits decide how many visitors you can serve at once. On shared hostingShared hosting Hosting where your website shares one server with many others. Cheap and simple; the host looks after the server. More about Shared hosting → they are often hidden in the terms; on a VPS they are the headline numbers.
  • UptimeUptime How much of the time a website or server is working and reachable, usually shown as a percentage like 99.9%. More about Uptime → guarantee is a promise about availability, usually 99.9%. See what 99.9% uptime means.
  • SSL certificateSSL/TLS certificate The small file that proves a website is really who it says it is and turns on the padlock (HTTPS). More about SSL/TLS certificate → makes the site load over HTTPSHTTPS The secure version of the web, shown by the padlock. Everything sent between you and the site is scrambled so nobody in between can read or change it. More about HTTPS →. Free certificates from Let’s Encrypt are standard now, so a plan that charges extra for basic SSL is overpriced.
  • Email may be included, limited, or not offered at all. Many people host email separately with a dedicated provider.
  • Backups may be daily, weekly or none. Check how long they are kept and whether restoring one costs extra.

How to choose your first host

  1. Start from what you will run. A WordPress blog, an online shop and a Node.js app need different things. Check the host supports your software and its current version.
  2. Pick the location nearest your visitors. A server in the same region loads noticeably faster for them.
  3. Read the limits, not the headline. “Unlimited” plans have limits in the terms. Compare CPU, memory and storage type.
  4. Check the renewal price, which is often two to three times the first-term price.
  5. Make sure you can leave. You should be able to download your files and database at any time. That is what keeps any host honest.
  6. Test support before you need it. Ask a technical question before buying and see how quickly, and how well, they answer.

Most new sites are fine on shared hosting, and moving up to a VPSVPS A private slice of a powerful server, with its own guaranteed share of memory and processing and full control, at a fraction of the price of a whole machine. More about VPS → later is routine.

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.