Build a personal website from 0
How to Build a Personal Website with AI in 2026
Plan your pages, install Git and Node.js, have an AI coding tool build an Astro site, deploy it free on Cloudflare Workers, then add a domain and get it on Google. Hosting can cost $0; the AI tool is the part you usually pay for.
Kelvin Wang · · 18 min read
Key points
- Hosting, GitHub and the framework can all be free; the domain and the AI coding tool are what you pay for.
- Write a design spec before building pages, or the AI's site will most likely look like a template.
- For each feature, write a spec, have the AI turn it into a plan, read the plan before it starts, and check the done criteria yourself.
- Most personal websites don't need a backend; you need one for sign-in, storing visitor data or showing fresh data on every load.
Cloudflare Workers hosts the site for free and gives you a workers.dev address. A custom domain starts around $10 for the first year, and renewals often cost more (my .info renews at $21.20 a year); GitHub and the framework cost nothing. Most AI coding tools start around $20 a month. My own site, kelvinwang.info, is built exactly this way, and each step shows its real configuration.
- Cloudflare Workers free plan: 100,000 requests a day, static assets free and unlimited
- $0
- Cloudflare Workers pricing
- My .info domain's renewal price (about $10 the first year)
- $21.20/yr
- ChatGPT Plus or Claude Pro billed monthly, which include Codex and Claude Code
- $20/mo
- Codex pricing
Step 1: Decide what goes on the site
List your pages before you build anything. Most personal websites come down to these:
- Home: one line on who you are and what you do, plus the one or two links you most want people to click.
- About: background, skills, how to reach you.
- Projects or work: what you’ve made, each with a short write-up and a link.
- Blog: if you want search traffic, you need this. Nearly all search visitors land on articles.
- Contact: an email address or social links. On a small site, fold it into About.
My site has a home page, About, Writing, a Lab section for hardware research, and a crypto exchange section, plus a private /app back office only I can sign in to. None of that existed on day one; pages were added one at a time. Home, About and a blog are plenty for a first version.
Decide on languages now as well. My site runs in Traditional Chinese and English under /zh-hant/… and /en/…. Adding a second language later means changing URLs, the sitemap and hreflang tags all at once, so it’s easier to plan for it from the start.
Look at real sites first
Before you write a line of code, open five or six personal sites you like and note what they have in common: how long the home page is, where the contact link sits, whether the blog or the projects come first. Those notes become the brief you hand the AI later. “Make it like these three sites, but with my content” gets far better results than “make me a nice personal website”.
Go deeper Personal Website Examples: 10 Real Sites and What Makes Each One Work Ten real personal sites, taken apart one by one.Step 2: Pick how you’ll build it
| Approach | Good for | Watch out for |
|---|---|---|
| AI website builders and drag-and-drop (Wix, Framer, Lovable) | Getting online today without touching code | Layout and features are limited to the platform; moving away is hard |
| WordPress | Lots of plugins, editing posts in an admin panel | You maintain hosting, plugin updates and security |
| Building with an AI coding tool | People willing to learn a little terminal and Git who want full control | Setting up the tools takes time; you need to read errors yourself |
This guide takes the third route: an AI coding tool builds an Astro site that you deploy to Cloudflare. Hosting is free, the design is entirely yours, and the code is a folder of files you own, so if you ever change hosts you take it with you. My own first version went from nothing to live in about an hour, mostly because Cloudflare and Supabase both connect to the AI tool over MCP, so it could deploy and set up the database itself instead of me clicking through dashboards.
Go deeper AI Website Builder vs Building with AI vs WordPress: Which One Fits You Cost, flexibility and lock-in compared across Wix, Hostinger, Framer, Lovable, WordPress and writing it yourself.What “building with AI” actually means
You describe what you want in plain English, and the AI writes and edits the code, runs commands, and shows you the result. People call the loose version of this “vibe coding”: you accept what the AI produces without reading much of it. That works well for a first draft of a personal site. It breaks down once things get more involved, such as sign-in, a database, or anything that handles other people’s data, because mistakes there don’t show up on screen. The workflow in this guide adds two habits that keep it under control: written rules the AI reads every session, and a short spec before each feature.
Go deeper What Is Vibe Coding? A Beginner's Guide, and Where It Breaks What it can do, and the points where it goes wrong.Step 3: Set up your computer (terminal, Git, GitHub, Node.js)
This is where beginners get stuck longest, and you only do it once.
1. Open a terminal. On a Mac, press Command + Space and search for Terminal. On Windows, open PowerShell. The terminal is the window where you type commands; every command below gets pasted there.
2. Install Git. Git records every change to your code so you can roll back when something breaks. On a Mac, run this and click Install when the dialog appears:
xcode-select --install
On Windows, download Git for Windows from git-scm.com 15 and accept the default options. Then check it worked:
git --version
If it prints a version number, you’re done. Tell Git who you are (it stamps this on every save):
git config --global user.name "Your Name"
git config --global user.email "you@example.com"
3. Create a GitHub account at github.com 16. GitHub stores your code online. A free personal account gets unlimited public and private repositories 11. Cloudflare will pull your code from here to deploy it.
4. Install Node.js. Astro and the deploy tools run on Node.js. Download the LTS version from nodejs.org 17 (as of November 2026 the newest LTS is v26; v24 and v22 are still supported), install it, and check:
node -v
npm -v
Astro currently requires Node.js v22.23.4 or later and doesn’t support odd-numbered releases like v23 7. My site’s package.json says "node": ">=22.12.0", which is looser than Astro’s current requirement; on a fresh install, take the newest LTS and you won’t hit it.
Step 4: Choose an AI coding tool
AI coding tools read your project folder, edit files directly and run commands. Common ones are Codex, Claude Code and Cursor, and they all work on the files on your own computer.
I pay for both a Claude plan and a ChatGPT plan and use both, so the steps below show Codex and Claude Code side by side; pick the one you pay for. With any tool the loop is the same: open the project folder, describe the change, look at what it did, save it if it’s right.
On cost, both need a paid plan in the terminal. Codex’s CLI comes with ChatGPT Plus and above, $20 a month 18; Claude Code starts with Claude Pro, $20 billed monthly, and the free claude.ai plan doesn’t include it 10. Plans change often, so check before you pay.
Go deeper Claude Code vs Codex vs Grok Build in 2026: Which AI Coding Agent Fits You Each tool judged on the same points: who it suits, how you use it, price and limits. No winner picked.Step 5: Install the AI tool and write its rules file
Pick your tool; the tabs swap every command in this step:
Codex
# macOS, Linux
curl -fsSL https://chatgpt.com/codex/install.sh | sh# Windows PowerShell
powershell -ExecutionPolicy ByPass -c "irm https://chatgpt.com/codex/install.ps1 | iex"Open a new terminal window and run codex --version. Then create a folder for the site and start Codex inside it:
mkdir my-site
cd my-site
codexOn the first run, choose “Sign in with ChatGPT” 19.
Claude Code
# macOS, Linux, WSL
curl -fsSL https://claude.ai/install.sh | bash# Windows PowerShell
irm https://claude.ai/install.ps1 | iexOpen a new terminal window and run claude --version. Then create a folder for the site and start Claude Code inside it:
mkdir my-site
cd my-site
claudeThe first run opens your browser to log in.
A version number means the install worked. Both also have a desktop app if you’d rather avoid the terminal. After logging in you just type what you want.
The rules file sits in the project root, and the tool reads it at the start of every session: Codex reads AGENTS.md, Claude Code reads CLAUDE.md. Put in it what the code can’t tell the AI: how to run tests, rules that must not be broken, decisions you’ve made. My site’s CLAUDE.md is 11 lines. A few of them:
- Design spec: read `DESIGN.md` before changing anything visible.
- Work directly on `main` unless Kelvin asks for a branch.
Pushing to `main` deploys (Cloudflare Workers Builds).
- Tests: `npx vitest run`.
Start short. Whenever the AI makes the same mistake twice, add one line with the right way to do it.
Go deeper Claude Code Tutorial 2026: Install, CLAUDE.md, Skills, and Your First Website Login options, everyday commands, skills and permission modes.Step 6: Pick a stack and create the Astro project
My site uses three pieces:
- Astro, the framework that assembles the pages. It suits content sites because most pages are generated as plain HTML at build time, which loads fast and is easy for search engines to read.
- Cloudflare Workers, where the site runs, in data centers around the world. The free plan covers a personal site.
- Supabase, a database with sign-in. Only the private back office uses it; the public pages don’t need it at all.
Astro was a lesson from an earlier project. That site used Next.js and deployed to Cloudflare through an adapter called @cloudflare/next-on-pages. When we upgraded Next.js from 13 to 14 in 2023, that adapter didn’t support the new version yet, so the deploy setup had to be redone along with the upgrade. The adapter was later deprecated. This time I checked how the framework and the host fit together first. Astro has an official Cloudflare adapter, maintained by the Astro team.
Create the project:
npm create astro@latest my-site
cd my-site
npm run dev
The setup asks a few questions; the defaults are fine the first time. Once npm run dev is running, open http://localhost:4321 in your browser to see the site. Then add the Cloudflare adapter:
npx astro add cloudflare
That installs @astrojs/cloudflare and updates astro.config.mjs. My site is on Astro 6, @astrojs/cloudflare 13 and Wrangler 4. The config that matters is short:
export default defineConfig({
// Every page runs in the Worker by default; public pages opt back into
// build-time rendering with `export const prerender = true`.
output: 'server',
site: 'https://kelvinwang.info',
adapter: cloudflare({ imageService: 'compile' }),
});
For a site with only static pages, leave output alone: Astro generates everything at build time by default. I use output: 'server' because the /app back office checks sign-in on every request.
Finally, save the project in Git and push it to GitHub. Create an empty repository on GitHub with “New repository”, then run (with your own URL):
git init
git add .
git commit -m "first version"
git branch -M main
git remote add origin https://github.com/your-username/my-site.git
git push -u origin main
The first push asks you to sign in to GitHub, and GitHub doesn’t accept your account password there. Git for Windows opens a browser sign-in for you; on a Mac the easiest route is to install the GitHub CLI 20 and run gh auth login, after which pushes just work.
Step 7: Write a design spec so the site doesn’t look like a template
Ask an AI for “a nice personal website” and you get the same thing everyone gets: a gradient headline, three cards, a row of icons. You gave it no preferences, so it falls back on the most common pattern.
The fix is a design spec, written before you build pages. My site has a DESIGN.md, a little over 400 lines today, which opens by saying the whole repo must follow it and it must be read before changing anything visible. It pins down specific things:
- What each color means (indigo for links in text, cyan for the brand, red only for danger).
- A type scale (article body 17px with 28px line height).
- Mobile rules (tap targets at least 44×44px, no hamburger menu as the main navigation).
- Which properties animations may change, and for how long.
Your first version doesn’t need to be that long. Write ten lines: two or three sites you like, a main color, a font, how navigation works on a phone, things you don’t want. Add one line to the rules file (AGENTS.md or CLAUDE.md): “read DESIGN.md before changing the UI”. When you see something you don’t like, change the spec first, then ask the AI to bring the code in line.
Go deeper Design Specs for AI-Built Websites: A DESIGN.md Template A DESIGN.md template you can copy.Step 8: Build page by page with a spec and a plan
For every feature I follow the same order: write a spec (what we’re building, why, and what counts as done), have the AI turn it into a plan (which files change, how each step is checked), and only let it start once I’ve read the plan. My repo’s spec/ folder holds more than 50 of these documents now, one per feature or decision.
A spec for an About page can be this short:
# About page
Goal: a first-time visitor knows who I am and how to reach me within 10 seconds.
Content: a short intro, three past roles, email and GitHub links.
Out of scope: résumé download, contact form.
Done when: no horizontal scroll at 390px wide; checked in light and dark themes.
Hand that to the AI and ask for a plan before any code. With a spec, you don’t have to watch every step: when the AI proposes something new, you check it against the spec.
When it says it’s finished, open the page on your phone yourself. “Done” from the AI isn’t the same as done; the done criteria are yours to check.
Go deeper AI Coding Workflow: Write the Spec, Then the Plan (Templates) Full spec and plan templates, and how to review a plan.Step 9: Add a blog
If you want Google to send people your way, you need articles. In Astro each post is a Markdown (or MDX) file: a few lines at the top for title, summary and date, then the text.
My posts live in src/content/posts/<slug>/zh-hant.mdx and en.mdx, one folder per post, one file per language. This article is one of those files, and its top looks like this:
---
slug: personal-website-guide-2026
lang: en
title: "How to Build a Personal Website with AI in 2026"
description: "Plan your pages, install Git and Node.js, ..."
publishedAt: 2026-11-07T00:00:00.000Z
---
I used to keep posts in the Supabase database and write them in an editor in the back office. On 5 November 2026 I moved every post back into the repo as files. The editor could only hold paragraphs, headings, tables and images, and every post had to be kept in sync between the database and the code. Now writing a post works like changing code: edit the file, commit, push, and the site rebuilds.
To get the AI to add a blog, you can say: “Add a blog using Astro content collections. Posts go in src/content/posts/, the list page is at /blog/, and each post has a title, summary and date.”
Does a personal website need a backend?
Most don’t. Home, About, projects and articles are fixed content; generate them as HTML at build time and you need no database.
You need a backend when people sign in, when you store data visitors send, or when a page must show fresh data every time it opens. I use Supabase for the /app back office: bookkeeping, social post drafts, and sign-in for me and the people I work with. Since November the public article pages don’t touch the database at all.
If you do add one, Supabase’s free plan includes a 500 MB database, 1 GB of file storage and 50,000 monthly active users, but free projects pause after a week without activity and you get two active free projects 12. My site is on the free plan, so the database costs nothing.
Go deeper Does a Personal Website Need a Backend? When to Add Supabase Supabase, Firebase and self-hosting on AWS compared on cost and upkeep.Step 10: Deploy for free on Cloudflare Workers
There are two ways to deploy. Set up both.
Manual deploy, to prove it works:
npx wrangler login
npm run build
npx wrangler deploy
wrangler login opens your browser to sign in to Cloudflare (create a free account first if you need one). When deploy finishes it prints a *.workers.dev address. Your site is now live on the internet, free, without buying a domain.
Automatic deploys on every push: in the Cloudflare dashboard go to Workers & Pages, choose Create application, connect GitHub and pick your repository, and set the build command to npm run build. From then on every push to main builds and deploys the site. Mine has worked like that since 29 September 2026: pushing to main is shipping. The Workers Builds free plan gives you 3,000 build minutes a month, one build at a time, 20 minutes max per build 2.
Two things to watch:
- The Worker’s name in the dashboard must match your project’s Worker name, or the build fails. If you have a
wrangler.jsonc, that’s itsname; without one, Astro uses thenameinpackage.jsonor the folder name 6. - Environment variables your build needs (a Supabase URL, for example) must also be entered in Cloudflare’s build settings. Your local
.envnever goes to GitHub, and it shouldn’t.
Automatic builds fail now and then. One case I hit: in November 2026 a few pushes built fine on my machine and failed on Cloudflare with EMFILE (too many open files). Rollup, which Astro uses under the hood, opens up to 1,000 files at once by default, and Cloudflare’s build environment has a lower limit. One line in astro.config.mjs fixed it:
vite: {
build: { rollupOptions: { maxParallelFileOps: 64 } },
},
So after a push, don’t assume it shipped. Check that the build passed in the dashboard, then open the live site.
Go deeper Cloudflare Workers Tutorial 2026: Astro SSR and Wrangler wrangler.jsonc, secrets, caching, logs, and debugging failed deploys.Step 11: Buy a domain and set up DNS
A workers.dev address works, but your own domain is easier to remember and looks more trustworthy.
- Buy the domain. Any registrar works. Cloudflare Registrar sells at the registry’s cost with no markup 5, and a domain bought there already has its DNS on Cloudflare. I bought mine there: after comparing extensions for a while, .info had the cheapest first-year price for my name, about $10 on the bill; the dashboard shows a renewal price of $21.20 a year.
- Move DNS to Cloudflare. If you bought elsewhere, add the site in the Cloudflare dashboard and change the domain’s nameservers to the two Cloudflare gives you. It can take a few hours to take effect.
- Point the domain at your Worker. Workers & Pages → your Worker → Settings → Domains & Routes → Add → Custom Domain, then enter the domain. Cloudflare creates the DNS record and the HTTPS certificate for you 4.
On 29 September 2026 I made kelvinwang.info the site’s only public address; the old workers.dev address is kept only for the back office’s home-screen app. When you switch addresses, redirect the old one to the new one. Two addresses showing the same pages look like duplicate content to Google.
Go deeper Buy a Domain and Set Up DNS with Cloudflare, Plus Free Email Forwarding (2026) Choosing a registrar, DNS records, and receiving mail at your own domain for free.Step 12: Get your site on Google
Going live doesn’t mean Google will list you. Work through this in order:
- robots.txt tells search engines what they may crawl. Mine blocks one redirect path and ends with the sitemap’s location.
- sitemap.xml lists every page URL. One sitemap holds up to 50,000 URLs or 50 MB 13. Mine is generated at build time by
src/pages/sitemap.xml.ts, with each URL pointing to its other-language version. - Google Search Console: verify your domain and submit the sitemap URL in the Sitemaps report. This is also where you’ll see which pages are indexed and what people searched to find you.
- A unique title and description on every page, written in the words searchers actually type.
- hreflang on multilingual sites, so Google knows the English and Chinese pages are the same article.
- Share images. My build generates a share card for every article, so links posted on social media show the title.
- llms.txt, a site summary for AI tools. My site has one (generated by
src/pages/llms.txt.ts), but Google says you don’t need any special AI text files to appear in its AI search features 14, so treat it as optional.
Submitting a sitemap is only a hint; Google doesn’t promise to crawl it. New sites usually take a while to get indexed.
Go deeper How to Get Your Personal Website on Google and AI Search: Launch Checklist Sitemap, Search Console, structured data and llms.txt, step by step.What it costs, and how far free gets you
My yearly costs, taken from my actual bills. Prices were first checked on 6 October 2026 and rechecked against official monthly prices on 7 November 2026:
| Item | How it adds up | Per year |
|---|---|---|
| Cloudflare Workers | Free plan | $0 |
| GitHub | Free account | $0 |
| Supabase | Free plan (back office only) | $0 |
| Domain | .info renewal price (about $10 the first year) | $21.20 |
| AI tool (pick one) | $20 × 12 months | $240 |
| Total | ~$260 |
Excludes tax. The domain is the renewal price in my Cloudflare dashboard, what I pay every year from year two. The AI line is counted as one $20 plan; I pay for higher Claude and ChatGPT plans myself, but one plan is enough for most people.
The all-free version is real, with limits you should know:
- Cloudflare Workers: 100,000 requests a day and 10 ms of CPU time per request; requests for static assets are free and unlimited. A content site is mostly static pages, so a personal site rarely gets near the cap.
- Workers Builds: 3,000 build minutes a month.
- GitHub: unlimited private repositories, with some features limited.
- Supabase (only if you need a backend): pauses after a week idle, no automatic backups.
Skip the domain and use the workers.dev address, and hosting is $0. The AI tool is the one piece that’s hard to get for free: Codex and Claude Code both need a paid plan in the terminal, and most other tools need one for sustained use too. Your yearly cost is the domain plus whatever AI plan you choose; moving the database to Supabase Pro would add $300, for about $550.
After launch: keep the site running with AI
Once the site is live, most of the work is new posts and small fixes. I keep the rules in the repo’s documents (CLAUDE.md, DESIGN.md, spec/), describe each change in a sentence, let the AI follow the documented rules, then review the result and decide whether it ships. The repo has more than 580 commits since 10 June 2026, nearly all made in that back-and-forth.
Keeping rules in files means you don’t repeat yourself. When the AI repeats a mistake, fix the document, and the next session gets it right.
Go deeper Running a Personal Website with AI: From One Request to Site Changes and Posts The full loop from request to discussion, execution and review.What breaks after launch
The common problems with AI-built sites after launch fall into a few groups:
- Failed deploys: fine on your machine, broken in the cloud build. Check the build result in the dashboard after every push.
- Leaked keys: an API key or password committed to GitHub. Put
.envin.gitignore; this repo had a commit on day one that ignores every.envfile. Store keys as Cloudflare secrets (npx wrangler secret put), never in the code. - Database permissions: Supabase RLS. A table with no policies, or wrong ones, can expose data to people who shouldn’t see it.
Update the framework and packages from time to time. My site is still on Astro 6 while newer versions are out on npm; read the official upgrade guide and try the upgrade on a branch before merging.
Go deeper What Breaks After You Launch an AI-Built Site: Failed Deploys, Leaked Keys, Database Permissions How to spot, fix and prevent each one.Sources
- 1. Cloudflare Workers Pricing
- 2. Workers Builds: Limits & pricing
- 3. Workers Builds
- 4. Custom Domains
- 5. Cloudflare Registrar
- 6. @astrojs/cloudflare
- 7. Install Astro
- 8. Node.js Releases
- 9. Claude Code: Advanced setup
- 10. Claude pricing
- 11. GitHub's plans
- 12. Supabase Pricing
- 13. Build and submit a sitemap
- 14. AI features and your website
- 15. Git for Windows
- 16. GitHub
- 17. Download Node.js
- 18. Codex pricing
- 19. Codex CLI
- 20. GitHub CLI
Kelvin Wang
Electrical engineer building tools with AI agents, sharing hands-on notes on engineering and investing.
More about me