Skip to content

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.

6 min read

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.

Can Claude build a website?

Yes. Claude writes the HTML, CSS and JavaScript for a complete website, and it can do that in two places.

In the chat, Claude shows a single page as an artifact with a live preview. That works well for a first draft or a landing page mockup. It stays one file in a chat window, though, with nowhere to host it and no second page that remembers the first.

In Claude Code, it works inside a project folder on your computer. It creates and edits every page, runs the build, checks the result and saves each step in Git. That is the way to a real website with many pages, and it is what the rest of this guide covers.

Putting the site online is the step that stays with you. Claude brings no hosting and no domain, and the accounts for host, domain and payments need your login. It prepares the files and walks you through the upload, as the section on going live below shows.

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 most useful 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. The guideline in Belhardt, a coaching template, states in one line that no element carries a radius, so a page added later cannot quietly bring rounded cards back.

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. Marnstett gives each of its three coaching programmes its own detail page, and Nordhelm does the same for eight practice areas of a law firm.

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 one-minute trailer shows a page being rebuilt from one sentence.

Frequently asked questions

It builds the whole website, every page, the styles and the scripts. Publishing is the part it leaves to you, because hosting, domain and payments run on accounts that need your login. In the chat you get a single page with a preview, in Claude Code a complete project you can keep building on.

A Windows or Mac computer, the free Node.js and a Claude subscription starting around twenty euros a month. That is all, no server and no special software.

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 most useful 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