BeginnerLesson 1 of 126 min read

What Hosting Is and How to Choose: Kinds of Hosting and a Cost Model

Understand where websites and apps run: shared hosting, virtual servers, managed platforms, static hosting and serverless. Compare them with a three-year cost model that includes renewals and traffic, and find the break-even point exactly.

In this lesson you will

  • Name the main kinds of hosting
  • Say what you manage in each
  • Compute a total cost over several years
  • Find the break-even traffic

About 28 minutes

Femi’s clients all ask the same question

Femi builds websites for small businesses, and every client asks where the site will live. Hosting means running your website or application on a computer that is always on and connected to the internet, a server, owned by a company that rents it to you. The options differ in how much of the work you do. Shared hosting puts many sites on one server and gives you a control panel: cheap, easy, with limits on performance and little control. A virtual private server, VPS, is your own virtual machine on a shared physical computer, where you install and secure everything yourself. A managed platform runs your code for you, deploying and scaling it, and you pay for the convenience. Static hosting serves ready-made files, with no server code to run, and is cheap and very fast. Serverless runs small pieces of code only when requests arrive and charges per request.

The right choice depends on what the site does and who looks after it. A brochure site of ten pages fits static hosting. A shop with a database and admin screens fits managed hosting or a VPS if someone can maintain it. A traffic spike, such as a mention on television, hurts a small shared plan and costs little on a platform that scales. Price comparison needs care: the advertised monthly price is often an introductory rate that rises at renewal, a domain and email may cost extra, and usage-based plans charge for traffic or requests. A three-year total cost, with the renewal increase and a realistic traffic estimate, is a fairer comparison than the first month’s price, and it can be written as a short formula.

Kind You manage Good for
Shared hosting Your site files Small simple sites
VPS Everything: system, security, updates Custom apps, learning
Managed platform Your code only Apps without a server person
Static hosting Your files Brochure sites, documentation
Serverless Your functions Spiky or low traffic APIs
const months = 36;
const plans = {
  'Shared':      { intro: 4,  introMonths: 12, renew: 11, usage: 0 },
  'VPS':         { intro: 12, introMonths: 0,  renew: 12, usage: 0, adminHoursPerMonth: 2 },
  'Managed':     { intro: 25, introMonths: 0,  renew: 25, usage: 0.002 },    // price per 1000 visits beyond the base, invented
  'Static':      { intro: 0,  introMonths: 0,  renew: 0,  usage: 0.0004 },   // price per visit
  'Serverless':  { intro: 0,  introMonths: 0,  renew: 0,  usage: 0.0009 },
};
const visitsPerMonth = 20000, hourly = 30;
function total(p, visits) {
  const fixed = p.introMonths > 0 ? p.intro * p.introMonths + p.renew * (months - p.introMonths) : p.renew * months;
  const usage = p.usage * visits * months;
  const admin = (p.adminHoursPerMonth || 0) * hourly * months;
  return { fixed, usage, admin, all: fixed + usage + admin };
}
const out = {};
for (const [k, p] of Object.entries(plans)) { out[k] = total(p, visitsPerMonth); console.log(k.padEnd(11), 'fixed', String(out[k].fixed).padStart(5), '| usage', out[k].usage.toFixed(0).padStart(5), '| admin time', String(out[k].admin).padStart(5), '| total over 3 years', out[k].all.toFixed(0)); }
const best = Object.entries(out).sort((a, b) => a[1].all - b[1].all)[0][0];
console.log('cheapest at', visitsPerMonth, 'visits a month:', best);
console.log('DATA ' + JSON.stringify({ out, best }));
Shared      fixed   312 | usage     0 | admin time     0 | total over 3 years 312
VPS         fixed   432 | usage     0 | admin time  2160 | total over 3 years 2592
Managed     fixed   900 | usage  1440 | admin time     0 | total over 3 years 2340
Static      fixed     0 | usage   288 | admin time     0 | total over 3 years 288
Serverless  fixed     0 | usage   648 | admin time     0 | total over 3 years 648
cheapest at 20000 visits a month: Static

The model adds three things for each plan over 36 months: the fixed fees, with an introductory price for the first months and the renewal price afterwards, the usage fees for an estimated 20,000 visits a month, and, for the VPS, the cost of the person who maintains it, two hours a month at a rate of 30. The prices are invented for the lesson. The totals are: Shared 312, VPS 2592, Managed 2340, Static 288, Serverless 648. The shared plan looks cheapest at 4 a month, yet over three years it costs 312 because the price rises to 11 after the first year, and static hosting wins with a total of 288, mostly usage fees. The VPS is cheap in cash and expensive in time: 2160 of its 2592 is the value of the maintenance hours, a cost that people who enjoy the work often forget and people who do not enjoy it feel every month.

The break-even question asks when a plan with usage fees costs the same as a flat plan. Static hosting at 0.0004 per visit costs the same as the shared plan’s 312 over three years at 21,667 visits in total, which is 602 visits a month: below that, pay per visit, and above it the flat plan wins, though it may be unable to cope. Rising traffic therefore changes the answer, which is why the cost model should be rerun when the site grows, and why the choice should be reviewed every year.

Independent check: the totals were recomputed in Python with a separate function for the fixed, usage and administration parts and agree with the JavaScript results for all five plans, and the break-even was solved with exact fractions and verified by substituting it back into both cost formulas. The prices are invented, so the numbers are an example of the method: with real quotes you would also add the domain, email, backups, a certificate if it is not included, and the cost of moving later.

Check by hand for the shared plan: 12 months at 4 is 48, and the remaining 24 months at 11 is 264, so 312. Static hosting at 20,000 visits a month for 36 months is 720,000 visits at 0.0004, which is 288. The cheapest is static, 288, against shared at 312.

Read the renewal price

The price on the front page is often for the first term only. Find the renewal price and the minimum term before you buy, and put a reminder in your calendar a month before renewal.

Price your own time

A server that you maintain costs your hours as well as cash. If an hour of your time is worth money, the cheapest plan may be a managed one.

About this course

Providers, plans and prices change often, so the lessons use invented prices and generic names, and you must check each provider’s current website. The server behaviour in this lesson was run for real on a Linux machine with Python 3.13, Node.js 22, OpenSSL and standard Unix tools, and every result was checked a second way.

Practice

Rerun the model with 200,000 visits a month and see which plan wins. Add a domain at 12 a year to every plan. Decide which kind of hosting suits a site you know, and write down why.

Check what you learned

Five quick questions. Pick an answer and you will see straight away whether it is right and why.

What is a VPS?

  1. A shared control panel
  2. Your own virtual machine on shared hardware
  3. A static file host
  4. A domain name

You manage everything on it.

Which hosting suits a ten-page brochure site?

  1. Static hosting
  2. A large VPS cluster
  3. A database server
  4. A mail server

No server code to run.

Why compare costs over three years?

  1. Introductory prices rise at renewal
  2. Prices never change
  3. Servers last three years
  4. It is a law

Include renewal and usage.

What is serverless?

  1. A server without electricity
  2. A kind of domain
  3. A shared panel
  4. Code that runs only when requests arrive, billed per request

Servers still exist; you do not manage them.

Why verify the model a second time?

  1. To make it longer
  2. To change prices
  3. It is required
  4. To catch arithmetic mistakes

Independent check.

Summary

  • Hosting runs your site on an always-on computer; the kinds differ in what you manage.
  • Compare total cost over years, including renewals, usage and your time.
  • Break-even points show when a different plan wins.
  • Recheck as traffic grows.

Next lesson

Lesson 2 covers servers, ports and sockets.

Questions

Is the cheapest hosting always a bad choice?

No. For a small simple site a cheap plan may be perfect. Check the renewal price, the limits and the support, and have backups.

Do I need a VPS to learn?

It is a good way to learn how servers work, and a small VPS is not expensive. Use a managed or static host for anything that must stay up without your attention.

Where is my site physically?

In a data centre, in a country that may matter for speed and for privacy rules. Many providers let you choose a region.

Progress is saved in this browser.