← All sections

Section 1

Server Setup

How a website actually exists on the internet — and how to put one up yourself, or tell an AI to do it for you and still understand what it did.

The one thing to remember Every unique web address you want needs one A record — unless it's just a slash after a name you already own. Understanding when you need a new record and when you don't is 80% of this whole section.

The four things every website needs

Google, your school's website, the page you're reading right now — all of them are the same four things. There is no fifth secret thing.

  1. A computer that never turns off. This is the server. It holds your files.
  2. An address. Something like 172.105.229.70. Computers find each other with numbers.
  3. A name that points to that address. Like yashina.burns.jp. Humans are bad at remembering numbers, so we built a phone book. That phone book is called DNS.
  4. A program that hands files to visitors. Usually nginx (say it "engine-x"). It listens for knocks on the door and hands out the right pages.

And one more, because the modern web insists on it:

  1. A lock. An SSL certificate. It's what makes the address start with https:// instead of http://, and what stops browsers from showing scary "Not Secure" warnings.

The building analogy

If the words above felt abstract, map them onto something physical:

The tech thingThe real-life thing
ServerA building
IP addressThe street address — "4 Privet Drive"
Domain nameThe name on the door — "The Dursleys"
DNSThe phone book that turns a name into a street address
nginxThe receptionist who decides which room each visitor is shown to
SSL certificateThe lock on the front door

When someone types your website's name, their computer asks the phone book "where does this name live?", gets back a street address, knocks on that door, and the receptionist hands over the right room's contents. That round trip happens in under a second, millions of times a day, and it has worked essentially this way since the 1980s.

Your own address, decoded

Look at the address bar of the page you're on right now. It has three different layers, and people mix them up constantly:

https://yashina.burns.jp/training
burns.jpThe domain. Someone paid money for this and renews it every year. It is owned.
yashina.A subdomain. Free to invent, but it needs a DNS record before it works.
/trainingA path. Free, instant, and it's really just a folder on the server.

You are looking at all three at once. Hold onto that — the next section is entirely about the difference between the last two.

The big one: subdomain vs. path

Say Microsoft wants a page for engineers. They have two choices, and both are completely valid:

engineers.microsoft.commicrosoft.com/engineers
What it's calledA subdomainA path
Needs a DNS A record?Yes — a new oneNo
Needs its own SSL certificate?Yes — a new oneNo — reuses the existing one
Needs server config?Yes — a new nginx fileUsually not
How long to set up~10 minutes, plus DNS waitSeconds. Make a folder.
Can it be a totally separate app?Yes — even a different serverHarder; it lives inside the same site
How Google sees itCloser to a separate websitePart of the same website

How to decide

Ask yourself one question:

Is this a room inside the house I already have — or does it deserve its own front door and its own lock?
The practical version Paths are cheap and subdomains are not. If you can't articulate why something needs its own front door, use a path. You can always split it out into a subdomain later — going the other direction is the easy one.

A mistake worth avoiding

Beginners often make a subdomain for every little thing — about.mysite.com, blog.mysite.com, photos.mysite.com — because it feels more official. Now you're maintaining four DNS records, four SSL certificates, and four server configs for what should have been four folders. Worse, search engines may treat them as four unrelated websites, so none of them builds up the reputation that would have helped the others.

Setting it up, step by step

This uses Linode (a company that rents you servers), but every hosting company works the same way. The names of the buttons change; the five steps do not.

0Own a domain

Before anything else. Buy a domain from a registrar — Namecheap, Cloudflare, Porkbun, GoDaddy. Expect $10–20 per year.

Do not skip this Build on a name you actually own. Free subdomains handed out by website builders can be taken away, renamed, or shut down, and you cannot move your visitors with you. Owning the name means you can change everything behind it — server, host, even the whole site — and people's bookmarks still work.

1Rent a server

On Linode: create a new instance.

When it finishes building, Linode shows you an IP address. That's your street address. Write it down.

2Point the name at the server — the A record

Go to wherever you bought the domain, find the DNS settings, and add a record:

FieldValueWhat it means
TypeA"This name points to an IPv4 address"
NameyashinaJust the prefix — not the whole address
Value172.105.229.70Your server's IP
TTL600Seconds others may cache it. 600 = 10 min.
The classic mistake In the Name field, type only yashina — not yashina.burns.jp. Most registrars add the domain for you automatically, so typing the full thing creates yashina.burns.jp.burns.jp, which resolves for nobody. If your new address doesn't work, check this first.

To check it worked, open a terminal and ask the phone book directly:

dig +short yashina.burns.jp

If it prints your IP, it worked. If it prints nothing, either the record is wrong or it hasn't spread yet. Registrars warn that DNS can take 48 hours; in practice it's usually minutes. Different parts of the world update at different speeds, so it working on your laptop but not your phone for a while is normal, not broken.

This is the step you repeat Every new subdomainshop., blog., test. — needs its own A record pointing at the same IP. One server can host hundreds of names. Every new path needs nothing at all.

3Install the receptionist

Connect to the server and install nginx:

ssh root@172.105.229.70

apt update
apt install nginx -y

Put your files somewhere, conventionally under /var/www/:

mkdir -p /var/www/yashina.burns.jp

Then tell nginx that this name maps to that folder. Create /etc/nginx/sites-available/yashina.burns.jp:

server {
    listen 80;
    server_name yashina.burns.jp;

    root /var/www/yashina.burns.jp;
    index index.html;

    location / {
        try_files $uri $uri/ =404;
    }
}

Read that out loud and it's almost English: listen on the normal web port; when someone asks for this name; serve files from this folder; if the file isn't there, say 404 Not Found.

Turn it on:

ln -s /etc/nginx/sites-available/yashina.burns.jp /etc/nginx/sites-enabled/

nginx -t                  # ALWAYS test first
systemctl reload nginx    # only if the test passed
Never skip nginx -t It checks your config for mistakes before you apply them. If a server is hosting other websites and you reload a broken config, you can take all of them down at once. Test, read the output, then reload. Professionals who skip this step are the reason outages have their own Wikipedia pages.

4Add the lock

Certificates used to cost money and take days. Now they're free and take about ten seconds, thanks to a nonprofit called Let's Encrypt. The tool is certbot:

apt install certbot python3-certbot-nginx -y

certbot --nginx -d yashina.burns.jp

It proves you control the name by placing a secret file on your server and checking it can fetch that file over the address — which is exactly why the A record has to work before this step. It then rewrites your nginx config to use the certificate and redirect http:// to https://.

Certificates expire every 90 days. Certbot installs a scheduled job that renews automatically, so this is genuinely a once-per-subdomain task.

Adding a path — the easy one

Now compare all of that to adding /training to a site that already exists:

mkdir -p /var/www/yashina.burns.jp/training
# put an index.html inside it

Done. No DNS. No certificate. No reload. No waiting. It's live the instant the file lands.

That is the difference the Microsoft comparison was pointing at. One of these is a construction project and the other is opening a drawer.

Getting an AI to do it for you

You don't have to memorize these commands. You do need to know enough to tell when an AI has done something wrong — which it will, confidently, at some point.

A prompt that works:

I have a Linode server at <IP ADDRESS> running Ubuntu,
and I own the domain <DOMAIN>.

I want <SUBDOMAIN>.<DOMAIN> to serve a simple static
site with an SSL certificate.

Walk me through it step by step. Tell me exactly which
DNS record to add at my registrar — I'll add it myself.
Before reloading nginx, always run nginx -t and show me
the output. Explain what each command does before running it.

Why that prompt is shaped the way it is:

The habit worth building When an AI hands you a command you don't recognize, ask "what does this do, and what happens if it's wrong?" before you run it. A good answer is reassuring. A vague one is a warning. This habit will serve you long after the specific commands on this page are obsolete.

Things to try

All of these are safe. None can break anything that matters.

  1. Change the smiley. Open this site's index.html, swap the emoji, reload. Smallest possible full loop: edit → deploy → see it.
  2. Add a path. Make /training/hello/ with its own index.html. Notice you touched no DNS and no certificate. This is the lesson, felt rather than read.
  3. Break it deliberately. Visit a URL that doesn't exist and meet your first 404. Then look at the server's log and find your own visit in it: tail /var/log/nginx/yashina.burns.jp.access.log. Every visit to every website is written down somewhere like this.
  4. Trace a real site. Run dig +short github.com. Those are real servers you just looked up in the real phone book — the same one your browser uses.
  5. Go find both patterns in the wild. Spend five minutes noticing which big sites use docs.company.com and which use company.com/docs. Once you see it, you can't unsee it.

Rules that keep you safe

Words you now know

WordMeaning
ServerA computer that stays on and hands out your files
IP addressThe numeric address of that computer
DomainA name you own and renew, like burns.jp
SubdomainA prefix on your domain. Needs an A record.
PathWhatever comes after the slash. Needs only a folder.
DNSThe internet's phone book
A recordOne phone book entry: this name → this IP
TTLHow long others are allowed to remember that entry
nginxThe program that serves your files to visitors
SSL certificateThe proof of identity that makes https work
SSHA secure remote terminal into your server
404"That file isn't here"