How to build a website with ChatGPT, step by step
Kofi Agyem, Founder and CEO, CloudzyroPublished · 6 min read
On this page
- 1. The short answer
- 2. Step 1: decide what the site needs
- 3. Step 2: write the first message
- 4. Step 3: save the files and open them
- 5. Step 4: ask for changes, one at a time
- 6. Step 5: add your own words and pictures
- 7. Step 6: check it before it goes online
- 8. Step 7: put it online
- 9. Step 8: connect your domain
- 10. When to move beyond the chat
Build a website with ChatGPT: the prompt to start with, getting complete files, editing them, adding your content and putting the site online.
1. The short answer
To build a website with ChatGPT, describe the site in one detailed message, ask for complete files rather than snippets, save them into a folder and open the page in your browser, ask for changes one at a time, swap in your own words and pictures, then put the folder online with a host and connect your domain. ChatGPT writes the code; it doesn't host it. That last step is where most people get stuck, so this guide spends time on it.
Setting up Cloudzyro inside ChatGPT, and which plans can deploy, is covered on our ChatGPT MCP page. This guide is the whole build, from the first message.
2. Step 1: decide what the site needs
ChatGPT in a chat is best at small sites: a landing page, a portfolio, a menu, an event page, a site for a small business with a handful of pages. If the site needs accounts, a database or payments that change things, it's an app, and a coding agent or an AI app builder will serve you better (see Step 8).
Write down the pages, the one thing visitors should do (call, book, buy, sign up) and how it should feel. Gather your text, logo and photos in one folder now; you'll need them in Step 5.
3. Step 2: write the first message
Be specific. Ask for plain HTML, CSS and JavaScript unless you have a reason not to: it runs anywhere and you can open it by double-clicking.
Build a website for a dog-walking business in Portland called Leash & Co.
Pages: Home, Services and prices, About, Contact.
Main action: book a free meet-and-greet; put a button for it at the top of every page.
Style: friendly and clean, white background, forest green and one warm yellow accent.
Contact page: a form with name, email, dog's name and message.
Use plain HTML, CSS and JavaScript: one CSS file and one HTML file per page.
Mobile first. Give every page a real title and meta description.
Give me each file complete, with its file name, ready to save.The last line matters: you want whole files you can save, not fragments to stitch together.
4. Step 3: save the files and open them
- Make a folder on your computer, for example
leash-and-co. - For each file ChatGPT gives you, create a file with exactly that name (
index.html,services.html,styles.css) in a plain text editor such as VS Code, paste the code and save. Make sure the editor doesn't add.txtto the end. - Double-click
index.html. It opens in your browser, and the links between pages should work. - Make the window narrow to see roughly how it looks on a phone, or use your browser's device toolbar in its developer tools.
If something looks broken, it's usually a file saved under the wrong name or in the wrong folder. Check the names match what the HTML refers to.
5. Step 4: ask for changes, one at a time
- Be specific about where: “On the Services page, make the price cards stack on phones.”
- Ask for the whole changed file: “Give me the full updated services.html.” Replacing a whole file is safer than editing lines by hand.
- Keep the conversation going in one chat so ChatGPT remembers the files. If it starts to forget, paste the current file back in and ask for the change against that.
- If a fix doesn't work twice, describe exactly what you see and ask what's causing it before it changes anything else.
Keep a copy of the folder each time it's in a good state, so you can go back.
6. Step 5: add your own words and pictures
Put your photos in an images folder inside the site folder and tell ChatGPT the file names: “Use images/hero.jpg on the home page and images/team.jpg on About.” Ask for descriptive alt text on every image. Resize big photos first; a 5 MB photo straight from a phone makes the page slow.
Write the facts yourself: prices, areas you cover, opening hours, your story. ChatGPT can tidy your wording, but it can't know your prices, and invented details are worse than gaps.
Forms need somewhere to send messages, because a plain HTML form has nowhere to go on its own. Ask ChatGPT to connect it to a form service such as Formspree or Basin, and send a test message once it's online.
7. Step 6: check it before it goes online
- Every link and button goes where it should.
- Each page reads well on a phone-sized window.
- No placeholder text is left (search the files for “Lorem” and “example”).
- No API keys or passwords are in any file. Anything in a static site's files can be downloaded by visitors.
8. Step 7: put it online
Pick the way that matches your ChatGPT plan:
- Deploy from the chat (ChatGPT Business, Enterprise and Edu). Add Cloudzyro as an app in developer mode once (setup on our ChatGPT page), then add it to a new chat and say “Put this site online with Cloudzyro.” ChatGPT sends the files (up to 500 files and 4 MB), follows the build and tells you the address. It can't see your secrets, delete a site or change your plan.
- Upload the folder (any plan). Sign up free at Cloudzyro, open Sites & Apps, select New site, choose an address such as
leash-and-co.cloudzyro.appand drop your folder (or a .zip) on the page. A static site with anindex.htmlgoes online as it is, usually within about a minute. - From GitHub. If you keep the files in a GitHub repository, connect it to your site and every change you push goes live by itself.
The Launch plan is free, business use included, and a static site like this never sleeps. Every deploy is kept as a version you can restore. More about hosting: Sites & Apps.
9. Step 8: connect your domain
Add your domain, such as www.leashandco.com, on the site's Domains tab, then add the CNAME record it shows (www pointing to domains.cloudzyro.app) where your domain's DNS is managed. It's usually live within 5 to 15 minutes, with HTTPS set up for you, and custom domains are free on every plan. Step by step: point a domain at your site. No domain yet? Search for one.
10. When to move beyond the chat
Copying files out of a chat works for a few pages. When it starts to feel like juggling, move up:
- Codex, OpenAI's coding agent, works in a folder on your computer, edits files directly and can deploy to Cloudzyro too. See Codex.
- Cloudzyro Agent builds in the browser with a live preview, so there are no files to copy: describe the site, or start from a template. For a small business site, try the restaurant or portfolio template. Edit the Portfolio template with Cloudzyro Agent.
- An app with accounts and data is better built in Cloudzyro Agent with Supabase, or with a coding agent. See how to make an app with AI.
Already have a ChatGPT-built site online? You can open it in Cloudzyro Agent from Sites & Apps and keep changing it by chatting. For the general approach with any AI tool, see how to build a website with AI.