← All sections

Section 1

Putting a website on the internet

Where websites actually live, and how to put one somewhere real — so that anyone, anywhere, can type an address and see the thing you made.

New to all this? If you've never typed a command into a black window before, read Section 0 first. It covers opening the Terminal, running a command, and telling whether it worked. This page assumes those.
Before you start This page has some unfamiliar words in it. That's normal and it's fine. You don't need to memorize any of them — you'll pick them up by doing this a couple of times, the same way you learned what "wifi password" meant without ever studying it.

The whole idea in one picture

Imagine you wrote a really good note and you want anyone in the world to be able to read it. You'd need three things:

That's a website. Genuinely, that's it. The rest of this page is just the names people gave to those three things.

The ideaWhat it's called
Somewhere that's always onA server
Its address, in numbersAn IP address — like 172.105.229.70
Its address, in wordsA domain — like yashina.burns.jp
The phone book connecting the twoDNS
The person handing out the notenginx (say it "engine-x")
The lock on the doorAn SSL certificate — it's what makes the s in https

Computers are happiest with numbers and people are happiest with words, so DNS sits in the middle translating between them. When you type an address, your phone quietly asks "hey, where does this name live?", gets back a number, and goes knocking. It takes about a tenth of a second and it happens billions of times a day.

Look at where you are right now

The address of this page has three separate parts, and almost everyone mixes them up at first:

https://yashina.burns.jp/training
burns.jpThe domain. Someone bought this and pays for it every year. It's owned, like a phone number.
yashina.A subdomain. Free to make up, but it needs a phone book entry before it works.
/trainingA path. Free, instant. It's just a folder.

You're looking at all three at once, in your own address. Nice place to learn them.

The one that actually matters

Here's the distinction worth learning properly, because it comes up every single time you make something new.

Say Microsoft wants a page for engineers. They could call it:

Both work. Both are real websites. But they are very different amounts of work:

engineers.microsoft.commicrosoft.com/engineers
Phone book entry needed?Yes, a new oneNo
New lock needed?Yes, a new oneNo — shares the existing one
Server setup needed?YesUsually none
Time to make itTen minutes, plus waitingAbout four seconds
How Google sees itAlmost a separate websitePart of the same website
How to choose Ask: is this a room inside the house I already have — or does it need its own front door?

A room → use a path. yoursite.com/about
Its own front door → use a subdomain. shop.yoursite.com

Most things are rooms. An about page, a photo gallery, a blog, a page about your band — all rooms. Use paths and your life is easy.

Save subdomains for things that are genuinely separate: a store running on completely different software, an app, a private dashboard only you log into.

A mistake almost everyone makes once Making a subdomain for everything because it looks more official. about.mysite.com, blog.mysite.com, photos.mysite.com — and now you're maintaining three phone book entries, three locks, and three server configs for what should have been three folders. You only do this once. Now maybe zero times.

Doing it: the five steps

This uses Linode, a company that rents you a computer in a datacenter. Every hosting company works the same way — the buttons have different names, the five steps don't change.

0Get a domain of your own

Buy one from a registrar — Namecheap, Cloudflare, Porkbun, and GoDaddy all do this. It's usually $10–20 a year.

Worth the money, genuinely Free web addresses given out by website builders can be changed or taken away, and if that happens you can't bring your visitors with you. When you own the name, you can change everything behind it — your host, your server, your whole site — and every link anyone ever shared still works. It's the one part you should own outright.

1Rent a server

On Linode, create a new instance:

When it's ready, Linode shows you an IP address. That's your street address. Keep it handy.

2Add the phone book entry

Go back to where you bought the domain, find DNS settings, add a record:

FieldPut thisWhich means
TypeA"this name points to this address"
Nameyashinajust the first bit
Value172.105.229.70your server's IP
TTL600how long others remember it — 600 seconds is 10 min
The mistake to expect In the Name box, type only yashina — not the whole yashina.burns.jp. Most registrars add the rest for you, so typing all of it creates yashina.burns.jp.burns.jp, which goes nowhere. If your new address doesn't work, check this before anything else. It's the number one cause.

To see whether it worked, open Terminal and ask the phone book yourself:

dig +short yashina.burns.jp
What you should see 172.105.229.70

Your server's address, printed back at you. That means the phone book entry is working.

Not ready yet yashina@Yashinas-MacBook-Air ~ %

Nothing printed, just a fresh prompt. Either the entry hasn't spread yet — wait ten minutes and try again — or the Name field has the whole address in it instead of just the first word.

If it prints your IP, you're good. If it prints nothing, either the entry is wrong or the world hasn't caught up yet. Your registrar will warn you this can take 48 hours — in practice it's usually a few minutes. It's also normal for it to work on your laptop but not your phone for a bit. Different parts of the internet update at different speeds. Not broken, just slow.

This is the step you'll repeat forever Every new subdomain needs its own A record pointed at the same server. One server can happily hold hundreds of names.

Every new path needs nothing at all.

3Set up the person who hands out the pages

Connect to your server and install nginx:

ssh root@172.105.229.70

apt update
apt install nginx -y

Make a folder for your files:

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

Then tell nginx which name goes with which folder. Make a file at /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 it slowly and it's nearly English: listen for visitors; when they ask for this name; give them files from this folder; if the file isn't there, say "not found".

Switch it on:

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

Nothing will be said. That's success — most commands that do something stay quiet.

Now check your work before applying it:

nginx -t
What you should see nginx: configuration file /etc/nginx/nginx.conf syntax is ok nginx: configuration file /etc/nginx/nginx.conf test is successful

Both lines. Only carry on if you see "test is successful". Warnings above it are usually fine; the word emerg is not.

Now switch it on for real:

systemctl reload nginx

Silence again. Open your address in a browser — it should be there.

Please always run nginx -t It checks your file for typos before they go live. If your server is holding other websites too, applying a broken config can knock all of them offline at once. Check, read what it says, then reload. This takes two seconds and has saved more weekends than any other habit in this section.

4Add the lock

Locks used to cost money and take days to get. 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 the name is yours by leaving a secret file on your server and then checking it can fetch that file from the address — which is exactly why step 2 has to be working first. Then it updates your config and sends http visitors to https automatically.

Locks expire every 90 days, but certbot quietly renews them for you. So this really is a once-per-subdomain job.

Now compare: adding a path

Everything above, versus adding /training to a site that already exists:

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

That's the whole thing. No phone book. No lock. No waiting. It's live the moment the file lands.

That gap — ten minutes versus four seconds — is what the Microsoft comparison was really about. One is a building project. The other is opening a drawer.

Having an AI do it with you

You don't have to memorize any of these commands. What you do want is enough understanding to notice when an AI has got something wrong — which will happen, and it'll sound completely confident when it does.

Here's a prompt that works well:

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 one step at a time. Tell me exactly
which DNS record to add — I'll add that part myself.
Before reloading nginx, always run nginx -t and show me
the output. Explain what each command does before you
run it, and stop if anything looks unexpected.

Why it's written that way:

A habit worth keeping When an AI gives you a command you don't recognize, ask: "what does this do, and what happens if it's wrong?" A clear answer is a good sign. A vague one means slow down. This habit will still be useful long after every specific command on this page is out of date.

Things to try

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

  1. Change the smiley. Open this site's index.html, swap the emoji, put it back on the server. That's the whole loop — edit, deploy, see it — at its smallest.
  2. Add a path. Make /training/hello/ with its own index.html. Notice you touched no DNS and no certificate. That's the lesson, but felt instead of read.
  3. Break it on purpose. Go to an address that doesn't exist and meet your first 404. Then find your own visit in the server's diary:
    tail /var/log/nginx/yashina.burns.jp.access.log
    Every visit to every website is written down somewhere like this.
  4. Look up a real site. Run dig +short github.com. Those are real machines, and you just used the same phone book your browser uses.
  5. Spot the pattern 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.

Staying safe

Words you know now

ServerA computer that stays on and hands out your files
IP addressThat computer's address, in numbers
DomainA name you own and renew, like burns.jp
SubdomainThe bit in front. Needs an A record.
PathThe bit after the slash. Needs only a folder.
DNSThe internet's phone book
A recordOne entry in it: this name → this address
TTLHow long others may remember that entry
nginxThe program that hands your files to visitors
SSL certificateThe lock that makes https work
SSHA secure way to type commands on a faraway computer
404"That page isn't here"