Episode 1 — Fundamentals / 1.2 — Client Server Architecture

1.2.g — What is Web Hosting and How It Works

Big Picture: A website is files and programs on a computer that stays online. Web hosting is how you rent space on a server so the world can reach your site 24/7 — usually together with a domain name and DNS so people do not have to memorize IP addresses.

Navigation: ← 1.2.f — Static vs Dynamic Websites · Episode 1 — Fundamentals →


1. What is Web Hosting?

Web hosting means renting space on someone else’s server (or on a pool of servers) so you can store your website’s files — HTML, CSS, JavaScript, images, server-side code, databases — and make them accessible on the internet around the clock.

IdeaPlain English
Not buying the machineYou pay a hosting provider to run hardware in a data center, keep it powered, cooled, and networked.
Always-onThe server stays connected 24/7 so visitors can open your site anytime (measured by uptime).
Public reachabilityThe host gives you a public IP (or a hostname behind a load balancer / CDN) so browsers worldwide can request your pages.
Bundled extrasPlans may include email, backups, SSL, control panels, databases, or one-click installs — depends on the product.

One-line definition: Web hosting is paying for reliable, internet-connected server space where your site lives and answers HTTP(S) requests.


2. How Web Hosting Works

You upload (or deploy) your files to the host. The server stays on the internet 24/7. When someone types your domain, DNS resolves it to your server’s IP address (or CDN target). The browser sends an HTTP(S) request; the server returns your files (or runs your app and returns a response).

┌─────────────────────────────────────────────────────────────────────────┐
│                    HOW WEB HOSTING WORKS (END-TO-END)                    │
└─────────────────────────────────────────────────────────────────────────┘

  YOU                                 HOSTING PROVIDER
  ───                                 ─────────────────

      │  1. Upload website files
      │     (FTP/SFTP, Git, panel, CI)
      ▼
  ┌──────────────┐                 ┌────────────────────────────────────┐
  │ Your site    │  ────────────▶  │  SERVER (24/7 on the internet)     │
  │ files / app  │    stored on    │  Web server + your content         │
  └──────────────┘                 └───────────────────┬────────────────┘
                                                       │
                                                       │  always connected
                                                       ▼
                                               ┌───────────────┐
                                               │   INTERNET    │
                                               └───────┬───────┘
                                                       │
  VISITOR                                              │
  ───────                                              │
                                                       │
  Types "yoursite.com"                                 │
       │                                               │
       ▼                                               │
  ┌─────────────┐      2. DNS: domain → IP    ┌────────▼─────────┐
  │   Browser   │ ──────────────────────────▶ │ DNS returns host  │
  │             │         lookup              │ server IP (or CDN) │
  └──────┬──────┘                             └───────────────────┘
         │
         │  3. HTTP(S) request (e.g. GET /)
         └──────────────────────────────────────────┐
                                                     ▼
                                            ┌────────────────┐
                                            │ Server sends    │
                                            │ files / response│
                                            └────────┬───────┘
                                                     │
         ┌───────────────────────────────────────────┘
         ▼
  ┌─────────────┐
  │   Browser   │  4. Renders the page
  └─────────────┘

Mental model: The host gives your site a reachable address on the internet; DNS is the directory that maps your human-readable domain to that address; the web server is what fulfills each request.


3. Types of Web Hosting

At a glance

TypeAnalogyTypical costBest when you…
SharedApartment building~$2–15/moAre new, have a small site, want low cost.
VPSCondo~$5–80/moNeed more control or predictable resources.
DedicatedOwn house~$80–300+/moNeed full hardware, high load, or policy reasons.
CloudHotel chainPay-as-you-goNeed elastic scale, many regions, rich services.
ManagedProperty manager + buildingPremiumWant the provider to run updates, backups, tuning.
ServerlessOn-demand kitchenFree tier + usageWant no servers to patch; code runs when called.
StaticBulletin boards everywhereFree / very cheapShip pre-built HTML/CSS/JS (and assets) only.

3.1 Shared Hosting

What it is: Multiple websites on one server, sharing CPU, RAM, and disk I/O. Each tenant has an isolated account, but the machine is still one shared pool.

Typical costAbout $2–15/month (intro promos vs renewal differ a lot).
AnalogyApartment building — one building, many units; shared walls, plumbing, and elevators.
ProsCheap, easy onboarding, control panels (cPanel/Plesk), one-click WordPress, often email included.
ConsNoisy neighbor risk, limited peak performance, little root control, scaling often means upgrading plan or migrating.
Good forBeginners, small sites, low-traffic blogs, brochure sites.
Example providersHostinger, Bluehost (also SiteGround, DreamHost, and many others).

3.2 VPS (Virtual Private Server)

What it is: One physical server runs several virtual machines. You get dedicated slices of CPU/RAM/storage (plan-dependent) and usually root access to your VM.

Typical costRoughly $5–80/month depending on cores, RAM, SSD, and bandwidth.
AnalogyCondo — your own unit and locks inside a larger building; clearer boundaries than a dorm room.
ProsMore control than shared, more predictable resources, run custom stacks, resize to bigger VMs.
ConsYou administer more (updates, firewall) unless you buy managed VPS; still shared physical node if hardware fails.
Good forGrowing sites, small APIs, staging servers, learning Linux and deployment.
Example providersDigitalOcean, Linode (Akamai), Vultr, Hetzner Cloud.

3.3 Dedicated Server

What it is: You rent an entire physical machine — all CPUs, RAM, and disks are yours. The provider houses it and connects it; you configure software (or pay for managed dedicated).

Typical costOften $80–300+/month (GPUs, premium networks, or enterprise SLAs cost more).
AnalogyYour own house — full plot; no upstairs neighbor thumping the floor.
ProsStrong performance for that box, full control, predictable (no other customer’s VM on the same CPU).
ConsExpensive, you operate patching/hardening unless managed, scaling is a bigger step (new server / migration).
Good forHigh traffic, large databases, gaming/voice hosts, enterprise workloads with specific needs.
Example providersOVH, Hetzner (dedicated lines), plus many enterprise hosters.

3.4 Cloud Hosting

What it is: Your workloads run on a hyperscale provider’s pool of machines. You use VMs, managed databases, load balancers, and auto-scaling; you pay for what you use (pay-as-you-go) and can span regions.

Typical costHighly variable — tiny dev VMs can be a few dollars a month; production with HA, data transfer, and managed services can run hundreds to thousands.
AnalogyHotel chain — busy night? Allocate more rooms across the network; quiet night? Pay for less.
ProsElastic scale, global regions, huge catalog of services (IAM, queues, ML, etc.), API-driven automation.
ConsBill surprises if untracked, security needs real discipline, finops overhead.
Good forScalable apps, SaaS, APIs, mobile backends, data and ML pipelines.
Example providersAWS, Google Cloud, Microsoft Azure.

3.5 Managed Hosting

What it is: The provider runs much of the stack and operations for you — updates, security patches, backups, monitoring, sometimes CDN and caching — so you focus on the site or product, not raw servers.

Typical costPremium vs DIY; often tens to hundreds/month per site or environment.
ProsLess ops burden, support from specialists, stacks tuned for WordPress or similar platforms.
ConsLess flexibility than rolling your own, higher price, some platform lock-in.
Good forBusiness-critical WordPress, agencies with many client sites, teams without dedicated ops.
Example providersWP Engine, Kinsta.

3.6 Serverless

What it is: No server management for you in the traditional sense. You upload code (or connect a repo); the platform runs it on demand and scales automatically. You do not SSH into a box you “own.”

Typical costFree tiers plus per-invocation, duration, and egress; can be very cheap for low/spiky traffic.
ProsNo patching servers, automatic scaling, fast deploys for APIs and frontends paired with the platform.
ConsCold starts, timeouts, platform limits, state lives in databases/storage you wire separately.
Good forJAMstack backends, event-driven jobs, APIs with unpredictable traffic, preview deployments.
Example providersAWS Lambda, Vercel, Netlify (Functions), Cloudflare Workers.

3.7 Static Site Hosting

What it is: Hosting meant for static files — HTML, CSS, JS, images — built ahead of time. No classic per-request server-side rendering on the host (optional edge functions are add-ons). Often Git push → build → CDN.

Typical costOften free for personal/small projects or very cheap; watch build minutes and bandwidth caps on free tiers.
ProsSimple mental model, fast global CDN, small attack surface for plain static pages, great DX with Git.
ConsNo traditional server session on origin; dynamic behavior needs client JS, serverless, or a separate API.
Good forDocs, landing pages, blogs via static site generators, SPAs with an external API.
Example providersGitHub Pages, Netlify, Vercel, Cloudflare Pages.

4. Hosting Comparison Table

TypeCost (typical)PerformanceControlScalabilityTechnical skill needed
Shared$2–15/moVariable; shared poolLowLimited; plan upgradesLow — panels & installers
VPS$5–80/moGood for the resources you buyHigh (root VM)Medium — resize VM / add nodesMedium — Linux, SSH, updates
Dedicated$80–300+/moVery high per boxVery highStep changes (new hardware)Medium–high — unless managed
CloudPay-as-you-goHigh if architected wellHigh (IaaS/PaaS)Very high — autoscaling, regionsMedium–high — IAM, networking, cost
ManagedPremium monthlyGood–high (tuned)MediumDepends on productLow–medium — less raw ops
ServerlessUsage-basedExcellent for bursty workloadsMedium (platform guardrails)Very highMedium — events, limits, cold start
StaticFree–lowExcellent via CDNLow–mediumHigh via CDN & buildsLow–medium — Git, build config

Renewals, bandwidth/egress, and support tiers change totals — always read the fine print.

Cost vs control (quick visual)

LOW COST ◄────────────────────────────────────────────► HIGH COST
   shared    static (free)    VPS      cloud    dedicated
     │            │             │         │           │
     ▼            ▼             ▼         ▼           ▼
LOW CONTROL ◄──────────────────────────────────────► HIGH CONTROL

5. Key Hosting Concepts

ConceptWhat it means
UptimeFraction of time the service is available. 99.9% per year ≈ ~8.7 hours downtime allowed annually (exactly 365.25 × 24 × 0.001 ≈ 8.76 hours). 99.99% is stricter. Real SLAs vary by tier and provider.
BandwidthData moved to visitors (especially egress). Video, downloads, or viral traffic can hit limits or extra fees.
StorageDisk for files and databases. SSD/NVMe is usually faster than HDD for web workloads; busy DBs benefit most.
SSL/TLS certificatesEnable HTTPS (encryption + identity). Many hosts automate Let’s Encrypt; browsers warn on plain HTTP.
cPanel / PleskWeb control panels for domains, email, files, DBs — common on shared hosting.
FTP / SFTPFile upload protocols. SFTP rides on SSH and is encrypted; legacy FTP often is not — prefer SFTP/SCP.
SSH accessSecure shell — command-line login to a Linux server. Typical on VPS, cloud VMs, and some advanced plans.

6. How to Choose a Host

Use your project type first; then narrow by budget, traffic, and how much ops you want.

                    START: What are you building?
                                    │
            ┌───────────────────────┼───────────────────────┐
            ▼                       ▼                       ▼
     Static site / doc        WordPress / small        Custom app / API
     portfolio, blog SSG      business brochure        needs DB + backend
            │                       │                       │
            ▼                       ▼                       ▼
   Static host (Git → CDN)    Shared or managed WP     VPS, PaaS, or cloud
   GitHub Pages / Netlify /   Hostinger / Bluehost      DigitalOcean /
   Vercel / Cloudflare Pages  or Kinsta / WP Engine     AWS / GCP / Azure
            │                       │                       │
            └───────────────────────┴───────────────────────┘
                                    │
                         Need huge scale / multi-region?
                                    │
                         ┌──────────┴──────────┐
                         ▼                     ▼
                        YES                   NO
                         │                     │
                         ▼                     ▼
              Cloud + autoscaling        VPS or managed tier
              (AWS/GCP/Azure)            may be enough
Your situationLean toward
First site, minimal budgetShared or free static hosting.
WordPress, want less opsManaged WordPress (e.g. Kinsta, WP Engine) or solid shared.
Custom stack, need rootVPS or cloud VM.
Spiky or global trafficCloud + CDN, or serverless/edge.
Mostly pre-built filesStatic host + CDN.
Compliance / dedicated ironDedicated or specific cloud contracts.

7. Domain + Hosting = Your Website

A domain registrar sells yoursite.com. DNS (at the registrar or a DNS host) points that name to your hosting (A/AAAA to IP, or CNAME to a platform). The visitor only types the domain; DNS and the host do the rest.

┌──────────────────────────────────────────────────────────────────────────┐
│         DOMAIN + DNS + HOSTING — COMPLETE PICTURE (VISITOR VIEW)          │
└──────────────────────────────────────────────────────────────────────────┘

   ┌──────────────────┐
   │ DOMAIN REGISTRAR  │  Registers "yoursite.com" (yearly fee)
   │ (Namecheap, etc.) │  You control renewal & WHOIS privacy
   └─────────┬────────┘
             │
             │  Nameservers → where the zone is hosted
             ▼
   ┌──────────────────┐
   │   DNS HOSTING     │  Records: A, AAAA, CNAME, MX, TXT…
   │ (Registrar,      │  e.g. www → server IP or CDN hostname
   │  Cloudflare,     │
   │  Route 53…)      │
   └─────────┬────────┘
             │
             │  Resolves to your hosting endpoint
             ▼
   ┌──────────────────┐
   │ HOSTING SERVER    │  Stores files / runs your app
   │ or CDN edge       │  Serves HTTPS responses
   └─────────┬────────┘
             │
             │  HTML, CSS, JS, APIs…
             ▼
   ┌──────────────────┐
   │     VISITOR       │  Browser opened yoursite.com → sees your site
   └──────────────────┘

Remember: Registration and hosting are different products. Same company is convenient; splitting (domain at A, DNS at B, site at C) is common and valid.


8. Popular Hosting Providers

Prices move constantly — verify renewal, bandwidth/egress, and currency on each site.

ProviderBallpark pricingModelBest use case
Hostinger~$2–12/mo promos (renew higher)Shared, some VPSBeginners, budget WordPress, small sites
Bluehost~$3–15/mo intro bundlesShared + WordPress focusStarters, simple business sites
DigitalOcean~$4–40+/mo Droplets commonVPS (“Droplets”), K8s, PaaSDevs, startups, predictable VMs
Linode (Akamai)Similar to DOVPS, KubernetesSame profile as DO
OVH / HetznerVPS from low single digits (region-dependent); dedicated higherVPS + dedicatedPrice-conscious EU/US infra, bare metal
AWSFree Tier for new accounts; then pay-as-you-goFull cloudScale, many services, global
Google CloudCredits + usage-basedFull cloudData, ML, multi-region
AzureUsage-based + enterprise dealsFull cloudMicrosoft ecosystem, hybrid
Vercel / NetlifyFree tiers; Pro ~$15–20+/mo per seat/project rulesStatic + serverlessFrontends, SSG, preview deploys
Cloudflare PagesGenerous free tier; paid for teams/limitsStatic + WorkersStatic sites + edge logic
WP Engine / Kinsta~$30–100+/mo per site (plan-dependent)Managed WordPressSerious WP, agencies, SLAs

9. Deploying Your First Website (Brief Overview)

StepWhat you do
1. Buy a domainChoose a registrar; enable privacy if offered; note nameserver settings.
2. Choose hostingMatch host type to your stack (static vs WordPress vs custom app).
3. Upload or deploy filesSFTP, control panel file manager, Git push, or CI/CD.
4. Configure DNSPoint A/AAAA to the server IP or CNAME to the platform hostname; add MX if email is separate.
5. Enable HTTPSInstall/enable TLS (often one-click); redirect HTTP → HTTPS.
6. TestTry mobile, another network, and basic checks (SSL, main pages, forms).

10. Key Takeaways

  • Web hosting = renting space on an always-on server so your files/app are reachable on the internet 24/7.
  • Flow: upload/deploy → DNS maps domain to host → browser requests → server responds.
  • Shared is cheap and easy; VPS adds control; dedicated is whole-machine power; cloud is elastic; managed cuts ops; serverless avoids server babysitting; static hosts excel at fast, cheap file delivery.
  • Know uptime, bandwidth, storage (SSD vs HDD), SSL, panels, FTP/SFTP, SSH — they appear on every plan and ticket.
  • Domain ≠ hosting: the name (registrar) and the computer (host) connect through DNS.

Explain-It Challenge

Without scrolling back, explain in your own words:

  1. What web hosting is, using the idea of renting space on a computer that stays online.
  2. The path from typing a domain to getting a web page, including DNS and the server.
  3. One pro and one con of shared hosting vs a VPS.
  4. Why 99.9% uptime still allows roughly ~8.7 hours of downtime per year.
  5. How static site hosting differs from a classic PHP shared host if you need a contact form that sends email (what changes in your architecture?).

Navigation: ← 1.2.f — Static vs Dynamic Websites · Episode 1 — Fundamentals →


Section 1.2 complete. You have moved from the client–server model through HTTP, the full browser journey, frontend vs backend, static vs dynamic sites, and finally how hosting puts your work on the internet. Return to the episode hub: Episode 1 — Fundamentals.