How to Build a Website with Claude Code (Complete 2026 Guide)
Claude Code can build a website. Whether it builds a good one depends almost entirely on what it finds in the folder before it starts. This guide covers the whole path, including the part most tutorials skip.
Claude Code is a terminal tool that reads and edits files in a project folder. That is a boring description of something genuinely different from a chat window: it sees your whole project, changes several files at once, runs the build and checks whether it worked.
For websites, that changes the workflow completely. This guide covers what actually works, based on building a lot of them.
What you need before you start
Three things, and one of them matters far more than the others.
Node.js, the free runtime almost every modern website build uses. Install it once.
Claude Code, installed with a single npm command and a Claude subscription.
A starting point. This is the one that decides the outcome, and the next section is entirely about it.
The part most guides skip
You can point Claude Code at an empty folder and say “build me a website for a physiotherapy practice”. You will get a website. It will be reasonable. Then you ask for a second page, and a third, and somewhere around page six you notice the buttons do not match, the headings changed size and the tone drifted from warm to corporate.
This is not a limitation of the model. It is a missing brief.
A human designer would ask twenty questions before starting: what is the brand, who is the audience, formal or casual, which spacing scale, how do we handle testimonials. Every answer becomes a rule that keeps page twenty consistent with page one. When nobody writes those answers down, the model has to invent them fresh each session, and it invents differently every time.
So the highest-leverage thing you can do is give the project a memory. In practice that means files:
- A guideline file, conventionally
CLAUDE.md, that states what the project is, which rules apply and what must never happen. - A context folder holding the design system, the tone of voice with example sentences, the audience and the SEO plan.
You can write these yourself in an afternoon. It is genuinely worth it, and it is also exactly what a well-built template ships with.
Setting up
Open a terminal in your project folder and run the install, then start the tool:
npm install
claude
From there you talk to it. The useful pattern is one clear instruction at a time, not a paragraph containing five wishes.
Good: “Add a services page listing our four treatments, using the same card layout as the homepage.”
Less good: “Build out the site with services and pricing and a blog and make it look modern.”
The first gives the agent a decision to verify. The second gives it five decisions and no way to check any of them.
Building the pages
Work in the order a visitor moves, not the order that feels technical.
Start with the homepage above the fold. Who is this for, what changes, what is the next step. Get those three right before anything else, because everything below inherits their tone.
Then one page per offer. Separate pages, not one page with sections. Search engines can only rank what has its own address, and visitors looking for one specific service should not have to scroll past the other three.
Then the trust pages. About, testimonials, contact.
Then the legal pages. In Germany, an imprint and a privacy policy are mandatory. Have them reviewed. Do not let an AI invent which regulations apply to you, because it will produce something plausible and wrong.
Keeping quality up
Three habits that prevent most problems:
Check after every meaningful change. Ask the agent to run the build. A change that breaks the build is much cheaper to fix immediately than five changes later.
Review the text yourself. Models write competent, slightly generic prose by default. The sentences that make a site feel human are usually the ones you rewrite. Cut anything that could appear on a competitor’s site unchanged.
Ask for the reasoning when something looks off. “Why did you use a different spacing here” often surfaces a missing rule, which you then write into the guideline so it never happens again.
Going live
The output is static HTML, CSS and JavaScript, which every host in the world can serve. Netlify, Vercel, Cloudflare Pages and ordinary shared hosting all work. There is no server to maintain and no database to back up.
Before launch, walk through this list:
- Every page has a unique title and description
- Images have alt text that describes them
- The site works at 390 pixels wide, not just on your laptop
- Links go where they claim
- The legal pages are filled in and reviewed
- A sitemap exists and is submitted to Google Search Console
When this approach is the wrong choice
It is worth being honest about the limits.
If you want to never see a terminal, use a website builder. The result is fine and the trade-off is a monthly fee forever.
If you need a genuinely custom design that has never existed, hire a designer. Agents are excellent at applying a system and mediocre at inventing one from nothing.
If you need it live this afternoon and have no starting point, a builder will beat this workflow on raw speed.
Where this approach wins is the middle ground that covers most businesses: a complete, fast, owned website that you can keep extending yourself for years, in your own voice, without asking anyone.
The shortcut
Everything above works from an empty folder. It just takes longer, because you are writing the brief as well as the site.
That is the gap our AI Website Templates fill: a finished industry website that already ships the guideline, the context folder and seven built-in skills, so the first sentence you type produces a page that matches the twenty already there. If you want to watch that happen before deciding, the live demo rebuilds a page from one sentence, no signup required.
Frequently asked questions
No, but you need to be comfortable opening a terminal and running two commands. After that you describe what you want in plain English. Knowing some code helps when something breaks, which is roughly once per project.
It runs on a Claude subscription, starting around twenty euros a month. There is no separate licence for the tool itself. For a single website project, one month is usually enough.
It can run the build and prepare the files, and it can walk you through connecting a host. The final step of pointing a domain at a server is yours, mostly because it involves accounts only you can log into.
Because nothing wrote down what the earlier pages decided. The model does not remember your spacing rules between sessions unless they exist as a file it can read. That file is the single highest-leverage thing you can add to a project.
It can be excellent, because the output is clean static HTML. But SEO is a set of decisions, not a side effect. Titles, descriptions, structure and internal links have to be planned. An agent will happily build a fast site that targets nothing.
Keep reading
- The 8 Best Website Templates for Claude Code and Cursor Eight website templates that actually work with AI coding tools, compared on structure, built-in context and ownership. What separates a template an AI can extend from one it only edits.
- AI Website Templates, What They Are and Why They Win What separates an AI website template from an ordinary one, why machine-readable context changes the economics, and when a normal template is still the better buy.
- What the Best SaaS Landing Pages Do (20 Patterns) Twenty patterns the strongest SaaS landing pages share, from the first line to the pricing table. Each one testable against your own page in under a minute.
- Squarespace Alternatives Without a Subscription Seven ways to get a Squarespace-quality website without paying monthly forever, with the real trade-offs of each and what leaving Squarespace actually involves.