‹ All posts

How I set up my first website from scratch

Why I’m doing this

I’m building my own website from zero, and this post is the record of how, written so you can follow along step by step. I’m an engineer and analyst by background, not a developer. I’m now learning to build AI agents in the PIAIC Agentic AI course, and I wanted a place to show what I build as I learn, so I’m building the site at the same time, not after.

I had a patient guide: I worked through every step with Claude, an AI assistant, and asked “why?” at each turn. This post keeps the reasons, not just the clicks. It’s done on a Windows computer, with free tools and one small paid item, my domain name.

Where I am as I write this: the site is built and running on my own computer, and nothing is live or public yet. I’ll keep updating the post as I go.

Step 1: Decide what the site is for

Before touching any tool, I decided the site would be a personal portfolio and a learning blog, and nothing commercial for now. That means no services, no prices and no client pitch.

Three reasons. I don’t have finished projects to sell yet, so a sales page would be dishonest. A simpler goal keeps the first version small enough to finish. And the choice affects later decisions, such as which hosting rules apply (Step 4). I can add services later once I have real work to show.

I also decided that every project on the site would carry an honest label: Idea, Building or Working. A learner’s portfolio is more believable when it shows how far each thing really got.

Step 2: Choose and register the domain

I registered rafaynaveed.com, my full name plus .com, through Cloudflare Registrar. Many well-known AI writers do the same: karpathy.ai, simonwillison.net, eugeneyan.com and huyenchip.com are all just a name.

Why my name and not a brand. My interests will change, and a name still fits whatever I’m doing in three years. A catchy brand tied to “AI agents” would not. For the same reason I rejected rafaynaveedai.com: it ties me to one topic, it is longer, and the letters run together so people mistype it.

Why .com. It is the extension people type by default, and it costs about the same as the alternatives for a plain name.

Check before you pay. Searching whether the name is available is free and commits you to nothing. Mine was available, so I registered it.

The lesson: compare the renewal price, not the first-year price. Registrars advertise a cheap first year, then charge more every year after. A 2026 comparison lists one big registrar with a first year of a few dollars that renews around $22, and another that goes from about $6 to about $14. The same article puts Cloudflare at about $10.44 for both. Cloudflare says it sells domains “at cost, without markup fees” and renews only at the registry’s list price. Prices change, so check the live price yourself before buying.

After buying, open the domain’s settings and check that auto-renew is on, so you never lose the name by accident.

Step 3: Pick the look

I wanted a clean, tech look in black and grey, with big headlines and rounded tiles, in the spirit of Apple’s website. It is style only: no logos, wordmarks or copied layouts.

I got there by elimination. I first looked at plain, text-first personal sites of well-known AI people. They are excellent, but that style wasn’t me. Then I picked a modern portfolio site I liked as a reference for how to order the sections.

Copy the structure, not the words. I borrowed the idea of a clear flow (introduction, projects, how I work, writing, contact) but rewrote every heading for my own situation. That site speaks as an expert offering services. Mine speaks as a learner building in public: a “Planned path”, honest project labels, a blog of weekly notes, and a contact line that says “Learning this too?” instead of offering services. If you are early in your journey, say so. It is more believable than pretending.

Before writing any code, I had Claude draft the homepage as a visual design on a canvas, so I could say “bigger dot”, “remove this section” or “rename that” and see it change in seconds. Changing a drawing is far cheaper than changing code.

Small touches: a black-and-grey palette with one green accent, the Inter font, and my name in the logo followed by a green dot.

Step 4: Choose where the site will live

I plan to host the site on Cloudflare, not on Vercel’s free plan. “Hosting” just means the computer that serves your pages to visitors.

Vercel is popular and easy, so I looked at it first. Its documentation describes the free Hobby plan as non-commercial personal use only, with commercial use needing a paid plan. Developers on Vercel’s community forum also point out that a site promoting your own services can count as commercial. My site is non-commercial for now, so it might be allowed today. But I expect to add services later, and I didn’t want to move hosts or hit a paywall when that happens.

Cloudflare is where my domain already lives, so everything sits in one account. Astro, the tool I’m using to build the site, also supports Cloudflare. Before going live I will read Cloudflare’s free-plan limits and terms myself.

An important point about timing: nothing is hosted yet. The domain exists, but no website is attached to it, and nothing is public. I’ll only connect the two after I have approved a private preview.

Step 5: Set up GitHub with a private repository

GitHub is the online home for my website’s files, and it keeps a full history of every change, so I can always go back. A “repository” (repo) is simply one project’s folder on GitHub.

  1. Create the account at github.com.
  2. Pick the username carefully. It becomes your public profile link (github.com/yourname). I wanted mine to match my domain and ended up with rafaynaveed-ai. Change it now, while the account is empty: GitHub’s documentation says your old username becomes available for anyone else to claim, and links to your old profile page return a 404 error. To change it, go to Settings, then Account, then Change username.
  3. Turn on two-factor login (Settings, then Password and authentication) and save the recovery codes somewhere safe. Your code and, later, your website deployments hang off this account.
  4. Create a repository with the + button, then New repository. I named mine rafaynaveed.com, ticked Add a README file, and left everything else as it was.
  5. Choose Private. This is the one that matters. A private repo can be seen only by you, so nothing is public until you decide. After creating it, confirm the Private badge appears next to the name.

You can do all of this from a phone. The next step needs a computer.

Step 6: Set up my Windows computer

Three free tools, installed in this order:

  1. Node.js is the engine that runs Astro. Download the Windows installer marked LTS (long-term support) from nodejs.org and keep the defaults. Astro’s install guide lists a minimum Node version (v22.23.4 or higher when I checked) and says odd-numbered versions such as v23 are not supported. Mine printed v26.13.1, which meets the requirement.
  2. VS Code is the editor where I read and edit the site’s files. It was already on my computer. The official Astro extension (search “Astro” in the Extensions panel) adds helpful colours and hints.
  3. Git saves versions of my work and sends them to GitHub. Download it from git-scm.com and keep the defaults.

Check each one by opening Command Prompt (Windows key, type cmd) and running:

node --version
git --version

If each prints a version number, it is installed. Mine printed Node v26.13.1 and Git 2.56.1.

The surprise. During the Node.js install, a blue PowerShell window appeared with a long wall of yellow warnings about failing to reach Microsoft servers. It was the Visual Studio Installer, almost certainly started by an optional “install the necessary tools” checkbox in the Node.js installer. It downloads several gigabytes of extras that a website like this doesn’t need. I ignored it and checked Node directly with node --version, which worked.

Lesson: don’t judge an install by a scary window. Judge it by the version command.

Step 7: Connect my computer to GitHub

Now the online repo and my computer need to be linked, so work I save here lands safely on GitHub. Two short jobs, both in Command Prompt.

1. Tell Git who I am. Git stamps my name on every saved version:

git config --global user.name "Rafay Naveed"
git config --global user.email "your-github-private-email"

For the email, use GitHub’s private no-reply address (Settings, then Emails, then tick “Keep my email addresses private”). That way my real email isn’t stamped on my code if a project becomes public one day.

2. Download (clone) the private repo:

cd %USERPROFILE%\Documents
git clone https://github.com/rafaynaveed-ai/rafaynaveed.com.git

Because the repo is private, Git asks you to sign in to GitHub in a browser window the first time. Afterwards a folder called rafaynaveed.com appeared inside Documents.

Check it worked: open that folder and look for README.md. Mine was there, so the link works.

Step 8: Create the Astro project

This step had three bumps, and the bumps are the most useful part. Here is what happened, in the order it happened.

Astro is the tool that turns my pages and blog posts into a fast website. I chose it because it is built for content sites like blogs and portfolios. I opened my repo folder in VS Code (Open Folder on the Welcome page), then opened its terminal (Terminal, then New Terminal) and ran:

npm create astro@latest .

Bump 1: Windows blocked the command. VS Code’s terminal uses PowerShell by default, and the command failed with red text saying that running scripts is disabled on this system. That is a normal Windows safety setting, not a broken install. The fix that changes nothing on the computer: click the small arrow next to the + in the terminal panel, choose Command Prompt, and run the same command there. (There is also a setting that allows scripts for your user, but I didn’t want to change system settings I didn’t need to.) Check that the prompt ends in your repo folder’s name before you run anything.

The dot means “build it right here in this folder”. The wizard asks a few questions. I chose the basic, minimal starter template, said Yes to installing dependencies, and meant to say No to creating a Git repository, because my folder is already one. I answered Yes by mistake, which is Bump 3 below.

Bump 2: “this folder is not empty”. My folder already held the README and a hidden Git folder, so the wizard said so and offered a new subfolder with a random name (mine suggested ./callous-crater). It did not delete anything. I typed ./site instead, so the project lives in a folder called site inside my repo. Hosting services can point at a subfolder, so this causes no trouble later. If a wizard ever offers to clear or delete the folder, don’t choose that: it could remove the hidden link to GitHub.

Bump 3: a second Git repository by mistake. Because I answered Yes to “Initialize a Git repository”, the new site folder got its own hidden .git folder inside my main repo. Two repos nested like that confuse Git. The fix, in Command Prompt:

  1. cd site, then check the prompt ends in \site>. This matters, because the next command deletes things.
  2. rmdir /s /q .git removes only that hidden folder inside site.
  3. cd .. goes back up to the main folder.
  4. git status should now list site/ as a new, untracked folder. That means the main repo owns it.

The nested repo was brand new and empty, so nothing was lost. Lesson: read each wizard question before pressing Enter, and run git status after anything that touches Git.

Then, from inside the site folder (type cd site first), I started the preview:

npm run dev

It prints a local address, usually http://localhost:4321. That page exists only on my computer, so no one else can see it.

Step 9: Turn the design into real pages

Astro’s starter page appeared at that address, so the foundation worked: Node, Git, a private repo and a running Astro project. Next I turned my homepage design into code. Claude wrote the code and copied it into my project folder (I gave it access to that one folder only, for that session). Afterwards I had it explain how the pieces fit, because I want to understand my own site.

The key ideas, in plain words:

  • The page is built from small pieces called components. Each section (navigation bar, hero, builds, blog, about, contact, footer) is its own file in src/components.
  • src/pages/index.astro is the homepage. It imports each component and lists them in order, so reordering the page means reordering lines.
  • src/layouts/Layout.astro holds what every page shares: the title, the font and the stylesheet, plus a <slot /> where each page’s own content goes.
  • Repeated things are a list plus a loop. The project tiles are a list of data at the top of a file and one tile template that is stamped out per item. To add a build, add one item to the list.
  • src/styles/global.css holds the look. The colours are variables at the top, so changing one line changes the whole site.

Bump 4: a stale error. My first preview showed a red “Could not import” error for a file that did exist. The files had been copied in one after another, and Astro tried to load the page before the last one arrived. Refreshing the browser (F5) fixed it, and restarting npm run dev also works. Lesson: when an error says a file is missing, check it is really missing, then refresh before hunting for a typo.

How much Astro do I need to learn? Not much. Enough to edit text, add a build to the list, add a blog post and read an error message. My real focus is Python and AI agents; the site only shows them off.

What comes next:

  1. Save my work to my private GitHub repo (my first commit).
  2. Fill in the placeholders: my photo, contact details and real course stages.
  3. Run the pre-publish checks: two-factor on, and read the hosting terms myself.
  4. Set up a private preview on Cloudflare.
  5. Go live only when I decide it is ready, and connect my domain then.

What I learned, and a checklist you can copy

Eight lessons so far:

  1. Decide the site’s purpose first. It shapes the hosting, the wording and the design.
  2. Compare renewal prices, not first-year prices. The cheap promo is marketing.
  3. Use your own name for the domain. It outlives any topic or brand.
  4. Copy a good structure, not the words. Write from where you really are.
  5. Keep everything private until you choose otherwise. Private repo, no hosting yet.
  6. Trust the version command, not the scary window.
  7. Read each wizard question before pressing Enter. One wrong Yes gave me a second Git repo to clean up.
  8. Read the error text, then check the basics. A blocked script, a “not empty” folder and a stale error each had a simple fix.

The checklist, in order:

  • Decide what the site is for (and what it is not)
  • Check that the domain name is free, compare renewal prices, then register it
  • Turn on two-factor login for the domain account and for GitHub
  • Create the GitHub account, set a username you’ll keep, and create a private repo
  • Install Node.js (LTS), VS Code and Git, and check node --version and git --version
  • Set your Git name and private email, then clone the repo
  • Create the Astro project in a subfolder (Command Prompt, not PowerShell), say No to a second Git repository, then run npm run dev
  • Build one section at a time and save each to GitHub
  • Preview privately, then go live only when you’re ready

Sources

Checked 23 November 2026. Prices and version numbers change, so always re-check.