Ninja Builder Sign in Get started

How to build a website with AI: a step-by-step guide for beginners

Three ways to create a website with AI compared, then eight steps that work with any tool: plan, prompt, build, check on phones, fix, SEO, security and publishing.

By Ninja Builder team8 min read
Title card reading How to build a website with AI, beside a sketch of a website shown on a laptop and a phone

Key takeaways

  • There are three ways to build a website with AI: hosted website builders, prompt-to-site apps and AI coding agents that write files you own.
  • Plan first: audience, pages, real content and the look. Real content is what keeps an AI site from feeling fake.
  • Ask the AI for a plan before it builds, and prefer plain HTML and CSS for most websites.
  • Check every page at phone size, test the form, and remove any invented text before publishing.
  • Add titles, descriptions and a sitemap, run a security check, then publish and connect your domain.

You can build a website with AI in an afternoon: describe the site you want, let an AI tool draft the pages, check them on desktop and phone, fix what's wrong in plain words, and publish. The hard part isn't the AI. It's choosing the right kind of tool for your site and knowing what to check before you put it online.

This guide is for anyone who wants to create a website with AI, from a portfolio or a small business site to a multi-page site for a product. It compares the three main ways to do it, then walks through the steps that work with any tool. If you need a single landing page, our landing page guide goes deeper on that. If your project needs accounts, a database or payments, it's an app rather than a website: see how to build a web app without coding.

Three ways to build a website with AI

Almost every option falls into one of three groups. They differ mainly in how much control you get and who owns the result.

Website builder with AIPrompt-to-site appAI coding agent
How it worksAnswer a few questions; it fills a template on its own platformDescribe the site in a chat; it generates and hosts itDescribe the site; the agent writes real files in a folder on your computer
Control over designWithin the builder's templates and blocksGood; you change things by chattingComplete; any design, any code
Who owns the resultLives on the builder's platformUsually exportable, varies by servicePlain files you own and can host anywhere
Skill neededNoneNone to startNone to start, more helps when things break
Good forSimple brochure sites with built-in hosting and formsFast prototypes and small sitesSites you want to keep, grow and move

Hosted website builders are the easiest start, but the site stays on their platform and their plan. Prompt-to-site apps are fast and fun; check whether you can export the code before you invest in one. AI coding agents such as Claude Code, Codex or Cursor write ordinary HTML, CSS and JavaScript files that you own. That's the route the rest of this guide focuses on, because it gives you the most freedom, but the steps apply to any tool.

Not sure which coding agent to use? Claude Code vs Cursor explains the difference between an agent and an AI editor, and our best AI model for coding guide covers the models behind them.

Step 1: Plan your website before you prompt

The biggest difference between a generic AI site and a good one is what you tell the AI. Spend ten minutes writing down:

  • Who it's for and what they should do. "Local families looking for a dentist; they should book an appointment."
  • The pages. For a small business site that's often Home, Services, About, Contact. Keep it short; you can add pages later.
  • The real content. Your actual services, prices, opening hours, address and a few lines about you. AI will invent placeholder text if you don't give it yours, and placeholder text is the main reason AI websites feel fake.
  • The look. Two or three sites you like, your brand colours and logo if you have them, and the feeling you want: calm, bold, playful, premium.
  • What must work. A contact form, a map, a booking link, a menu that works on phones.

Put it all in one note. You'll paste it into your first prompt, and you'll use it later as your checklist.

Step 2: Write a prompt that creates the website

Give the AI the whole picture in one message, and ask it to plan before it builds. For example:

Build a 4-page website for Bright Smile Dental, a family dentist in Leeds.
Audience: local parents booking check-ups for their kids.
Pages: Home, Services, About, Contact.
Use the content below exactly; don't invent prices or reviews.
Style: calm and friendly, white and soft teal, rounded buttons.
Must work: phone menu, contact form, "Book now" button on every page.
Use plain HTML and CSS in a folder called site/.
First show me a short plan with the sections of each page, then build.

[paste your content here]

Three details in that prompt do a lot of work: real content ("don't invent"), a clear audience, and "plan first". Reading a plan takes a minute and saves you from a site with the wrong structure. Our guide on how to prompt AI coding agents has more patterns like this.

Step 3: Let the AI build the first version

Approve the plan, or correct it ("merge About into Home", "add a prices section"), and let it build. With a coding agent you'll see files appear: an index.html per page, a stylesheet, maybe a little JavaScript for the menu and form.

Plain HTML and CSS is the right choice for most websites. It's fast, it's easy to host anywhere, and there's nothing to break. Only ask for a framework such as React or Next.js if you know you need one, for example because a developer will take it over.

Before you change anything, save a restore point. If you're comfortable with Git, commit the first version. Most AI coding tools also keep their own checkpoints so you can go back to before a reply. Our article on undoing AI code changes explains the options.

Step 4: Check it on desktop, tablet and phone

Open the site in a browser and look at it the way a visitor would. Then make the window narrow, or open it on your phone. Most visitors to a small business site arrive on a phone, so this matters more than the desktop view. Check:

  • Does the menu open and close on a phone?
  • Is text readable without zooming, and are buttons big enough to tap?
  • Do all links and the "Book now" button go to the right place?
  • Does the contact form actually send somewhere, or does it just look like a form?
  • Is any placeholder text, fake review or invented price left anywhere?

You can also ask the AI to check for you: "Open the site at phone size and test the menu, the form and every link." A coding agent with browser tools can click through the pages and report what it finds.

Step 5: Fix what's wrong in plain words

Be specific. "Make it better" gets you random changes. "On the Services page, the cards are too close together on phones; add more space between them and make the headings one size smaller" gets you exactly what you asked for. Point at the element, say what's wrong, and say what you want instead.

Change one or two things per message, check the result, and keep going. If a change goes badly, go back to your restore point instead of asking the AI to undo it piece by piece.

Step 6: Make the website findable

A website nobody can find doesn't do much. Ask the AI to handle the basics, then check them yourself:

  • A unique title and description on every page, written for people searching, such as "Family Dentist in Leeds | Bright Smile Dental".
  • One clear main heading per page that says what the page is about.
  • Alt text on images that describes them.
  • Your name, address and phone number as text, not only in an image, if you're a local business.
  • A sitemap.xml and robots.txt, so search engines can find every page.
  • Fast pages: compressed images and no heavy scripts you don't need.

After you publish, add the site to Google Search Console and submit the sitemap.

Step 7: Run a security check before you publish

A simple website has little that can go wrong, but AI-built projects sometimes contain things that shouldn't go online: an API key written into a file (for example for a map or a form service), a .env file in the folder you're about to publish, or debug settings left on. Ask the AI to check before you publish, or use a checklist like our security checklist for AI-built apps. If a key was ever published, removing it isn't enough: make a new one in that service's dashboard.

Step 8: Publish your website and connect a domain

Plain HTML sites can go on almost any host, and several have free tiers for static sites, such as Vercel, Netlify, Cloudflare Pages and GitHub Pages. The usual flow is: create an account, upload the folder or connect a Git repository, and get a link. Then buy a domain from any registrar and point it at the host by following the host's domain instructions.

Keep the folder and your notes. When you want to change something next month, you open the same project, describe the change, check it and publish again.

Common mistakes when you create a website with AI

  • Letting it invent content. Made-up reviews, prices or claims can mislead visitors. Give it real content and tell it not to invent.
  • Skipping the phone check. A site that looks great on a laptop can be unusable on a phone.
  • A form that goes nowhere. Many AI-made forms look right but don't send anything. Test it with a real message.
  • Asking for everything at once. Build the core pages first, then add features one by one.
  • No restore point. Save a version before every big change.

Building a website with AI in Ninja Builder

If you'd like these steps in one window instead of a terminal and a browser, Ninja Builder is a desktop app for Mac, Windows and Linux that runs AI coding agents with your own account (Claude, ChatGPT, Cursor, GitHub Copilot, Gemini, Grok or a local model). Here's how the steps above map to it:

  1. Start: click Build a website or app on the start screen and type what you want after it, for example "a 4-page site for a family dentist", then paste your notes.
  2. Check: the site opens in the Preview next to the chat and reloads as the AI works. Switch between Desktop, Tablet and Phone sizes.
  3. Fix: turn on Comments in the Preview, click any part of the page and write what should change, then send all your comments as one message. For small text changes, click Edit and type straight on the page; it saves into the HTML file.
  4. Undo: every reply gets a restore point. Hover your message, click ⋯ and choose Restore to here.
  5. Publish: Publish online (/deploy) runs a security check first, then puts the site on a temporary Vercel link that works straight away, with a private claim link to keep it in your own free Vercel account. Nothing goes online without your yes.

Using Claude? Our Install Claude Code page shows the terminal setup, or download Ninja Builder and let it get Claude ready for you.

Frequently asked questions

Can AI build a whole website for me?

Yes. Website builders with AI, prompt-to-site apps and AI coding agents can all create a complete small website from a description. You still need to supply real content, check it on phones and test forms and links before publishing.

What is the best way to create a website with AI?

For the quickest simple site, a hosted website builder with AI. For a site you own and can host anywhere, an AI coding agent such as Claude Code that writes plain HTML and CSS files.

Do I need to know how to code to build a website with AI?

No. You describe what you want and check the result. Basic knowledge helps when something breaks, but you can ask the AI to explain and fix problems in plain words.

Is a website made with AI good for SEO?

It can be. Give each page a unique title and description, one clear heading, real content, alt text on images and a sitemap, then add the site to Google Search Console.

Where can I host a website built with AI?

A plain HTML and CSS site can go on almost any host. Vercel, Netlify, Cloudflare Pages and GitHub Pages all have free tiers for static sites.

Keep reading