Article Getting Started

What is web hosting, and how does it work?

A website is files sitting on a computer that never turns off. Here is what a host actually does and why you need one.

Updated 9 min read Beginner

A website is, underneath everything, a folder of files: HTML, images, style sheets, maybe a database. For anyone to see it, those files need to sit on a computer that is switched on and connected to the internet all the time — not your laptop, which sleeps, updates, and is not built to answer thousands of strangers' requests. That computer, and the service that keeps it running for you, is what "web hosting" means.

What actually happens when someone visits your site

Type a domain into a browser and a short chain of events runs before anything appears on screen:

  1. Your browser asks DNS which server the domain points to. DNS is effectively the internet's address book, translating a name like yourdomain.com into the location of a specific server.
  2. Your browser connects to that server and requests the page.
  3. The server reads the relevant files — running any PHP or database queries needed to build the page — and sends the finished result back.
  4. Your browser renders what arrives into the page you actually see.

All of that happens in a fraction of a second, and it happens again for every single visitor, at every hour of the day. That is the job a host is actually doing: keeping a server available, connected and correctly configured so this exchange works every time, for every visitor, without you doing anything.

What you are actually paying for

A hosting plan bundles several things that all point at the same goal — keeping your site reachable:

  • Storage for your website's files, database and email.
  • Bandwidth to actually deliver those files to visitors.
  • Server software already installed and maintained — web server software, a database engine, PHP or another language runtime — so you are not setting any of that up yourself.
  • A control panel for managing files, email, domains and databases without needing to operate the underlying server directly.
  • Ongoing maintenance of the physical and software infrastructure, security patching, and a network connection sized to actually serve traffic.

What you are not usually paying for, on a standard hosting plan, is a computer reserved entirely for you. That distinction is what separates the different types of hosting available.

Shared hosting, and why it is the default starting point

Most websites start on shared hosting, where one physical server is divided among many customers, each with their own account, files and control panel, isolated from one another. It works because most websites use only a small slice of a server's total capacity most of the time — sharing the machine keeps the cost low without most sites ever noticing they are sharing anything.

The trade-off is a ceiling on resources, set to keep one account from affecting everyone else's performance. For the overwhelming majority of blogs, small business sites and portfolios, that ceiling is never reached. Shared, VPS or dedicated: which do you actually need goes into when it stops being the right fit.

Hosting and a domain are not the same purchase

A common point of confusion for anyone new to this: buying hosting does not automatically buy you a domain name, and buying a domain does not automatically give you anywhere to put a website. They are two separate products that have to be connected — a domain is an address, hosting is the building the address points to. See do you need both a domain and hosting for how the two fit together in practice.

You rarely deal with the server directly

Very little of running a website day to day involves thinking about the server as a piece of hardware. Almost everything is done through a control panel — uploading files, creating email addresses, installing software, managing DNS — which exists precisely so you do not need to know Linux system administration to run a website. Behind the scenes, your host handles the operating system, security patching and hardware; you handle the content.

Where a CMS fits in

Hosting gives you somewhere to put files. It does not, by itself, give you a website builder. Most people running a hosted website use a content management system on top of it — WordPress being the most common by a wide margin — which handles pages, posts and design without requiring you to write code. What is a CMS, and do you need one covers that layer in more detail.

Why uptime matters more than almost anything else

A website that is slow is a mild inconvenience. A website that is down is a business problem — visitors leave, emails on that domain may stop arriving, and any transaction mid-flight fails. Hosting providers generally publish an uptime target — ours is 99.9% — reflecting the fact that a server going offline is treated as the exception that gets fixed immediately, not a normal part of the service.

Getting started once you understand the pieces

In practice, getting a website online comes down to a short sequence: choose a plan sized to what you are actually building, connect a domain to it, upload or install your site, and confirm it works before telling anyone the address. How to choose a hosting plan you will not outgrow is the natural next read if you have not picked one yet, and uploading your first website covers what happens once you have.

Related reading