October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsWindows FixRecommendedWindows errors stealing your time? Find the fix fastScan stability, cleanup and performance issues.Fix NowOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk10 min

How to Use LLMs to Build a Website: A Practical, Safe Workflow

Build a website with an LLM using a reviewable workflow: define a brief, plan before coding, ship a thin slice, test every layer, and deploy with production controls.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Yes—you can use ChatGPT, Claude, or another large language model (LLM) to build a website, but treat the model as a fast implementation partner rather than an autonomous developer. Give it a precise brief, ask for an implementation plan before code, build a small vertical slice, and test every generated file before publishing. For a lightweight site, a managed builder such as ChatGPT Sites can take you from description to preview and deployment. For applications that need a repository, database, private service, background job, or custom hosting, use a coding agent or model API and keep the code under your control.

This guide shows both routes, provides prompts and runnable examples, and covers accessibility, security, deployment, troubleshooting, and visual verification.

1. Decide what you are building before you prompt

An LLM can generate plausible code from a vague request, but it cannot infer your business rules, content rights, browser support, or operational limits reliably. Write a short brief first and keep it beside the project.

Include these requirements

  • Audience and outcome: who should use the site and what action should they complete?
  • Pages and content: list routes, headings, calls to action, images, and authoritative content sources.
  • Visual direction: colors, typography, spacing, examples you like, and components that must remain consistent.
  • Responsive behavior: define mobile, tablet, and desktop breakpoints and what changes at each one.
  • Accessibility: semantic HTML, keyboard operation, visible focus, labels, contrast, reduced-motion support, and meaningful alternative text.
  • Interactions and data: forms, authentication, payments, search, API calls, loading states, and error states.
  • Browser and deployment constraints: supported browsers, static versus server-rendered output, hosting, domain, DNS, environment variables, and retention requirements.

Ask the model to identify unknowns instead of inventing values. A useful opening prompt is:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

“Act as a senior web engineer. Here is the product brief: [paste brief]. Before writing code, list assumptions, risks, routes, components, data flows, dependencies, security decisions, and a test checklist. Ask questions for anything that is not specified.”

2. Choose a build surface

Route Best fit Trade-offs to check
Managed AI site builder Landing pages, portfolios, documentation, and other lightweight sites that need quick editing and publishing. Less control over framework, private networks, databases, background services, hosting, and portability. Availability and plan limits can change.
Coding agent with a local repository Teams that need Git history, custom frameworks, tests, private services, databases, or bespoke deployment. You own setup, dependency updates, security review, hosting, and operations.
Direct model API Automated scaffolding, code review, content pipelines, or an internal tool integrated into an existing engineering workflow. You must design prompts, tool permissions, retries, rate-limit handling, spend controls, and evaluation.

OpenAI describes Sites as a flow in which you ask ChatGPT to build a website and describe what you want it to do. The documented sequence is to describe constraints, review the generated preview, request changes, save a version, and deploy after review. Treat every deployment URL as a production URL. A managed builder is therefore a poor fit for an application that requires infrastructure it does not expose.

3. Plan the project before generating files

Do not ask for an entire production application in one response. Request a file and component map first.

Prompt for an implementation plan

“Using the brief above, propose a directory tree, routes, component responsibilities, data model, dependencies, environment variables, authorization boundaries, and test cases. Separate confirmed requirements from assumptions. Do not write implementation code yet.”

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Review the plan for accidental scope. Remove packages that duplicate platform features, reject libraries with unclear maintenance, and make the model explain why each dependency is needed. Decide where secrets live before any code is generated: browser bundles are public, so API keys and signing secrets belong in server-side configuration.

4. Build a thin vertical slice

Generate one representative page and its most important interaction first. A useful slice might include the home route, a responsive navigation menu, one form, and the server endpoint that validates the form. This exposes architectural mistakes before they spread across ten pages.

  1. Ask for complete files or a concise diff. Name exact paths and the framework version. Avoid edits that cannot be reviewed.
  2. Run the slice locally. Check the console, network panel, server logs, and behavior with JavaScript disabled where practical.
  3. Test the acceptance criteria. Verify keyboard navigation, focus order, mobile layout, loading, empty, success, and failure states.
  4. Only then expand. Add one route or interaction at a time, keeping the same component and naming conventions.

Prompt for a constrained change

“In src/components/SignupForm.tsx, submitting an empty email currently sends a request. Add client-side validation, preserve the server response as the source of truth, show an accessible error linked to the field, and add tests for empty, malformed, and accepted addresses. Return a unified diff and list any assumptions.”

5. Review generated frontend and backend code

HTML and CSS

  • Use headings in a logical hierarchy, landmarks such as nav and main, real buttons for actions, and labels associated with inputs.
  • Check layouts at the breakpoints in your brief rather than trusting a single desktop preview.
  • Confirm focus indicators, contrast, text resizing, reduced motion, and alternative text for informative images.
  • Remove placeholder copy, debug styles, unused selectors, and accidental horizontal scrolling.

JavaScript and state

  • Inspect loading, cancellation, retries, timeouts, empty responses, malformed data, and offline behavior.
  • Ensure state updates cannot display one user’s data to another user in a shared component or cache.
  • Do not trust client-side checks; repeat validation on the server.

Server and data access

  • Authorize every protected action on the server, validate types and ranges, and rate-limit abuse-prone endpoints.
  • Use parameterized database queries and explicit error handling. Return safe messages to users while logging useful diagnostic context privately.
  • Keep API keys, database credentials, signing keys, and model credentials out of source control and client-side bundles.
  • Treat generated dependencies and configuration as untrusted until you inspect versions, permissions, licenses, and transitive packages.

OpenAI production guidance emphasizes input sanitization, error handling, prompt and model management, and operational planning. For a production model integration, keep prompts in code so they can be reviewed and tested, and pin a specific model snapshot when the provider supports it. Define bounded tool stages and grant each tool only the access it needs.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

6. Verify before deployment

Run the project’s formatter, linter, type checker, unit tests, integration tests, and accessibility checks. Use browser checks for every supported viewport and for keyboard-only operation. Inspect the built output for source maps, debug endpoints, exposed environment variables, and unexpectedly large assets.

Visual checks with screenshots

Automated browser screenshots make responsive and regression checks repeatable. Capture the same routes at fixed viewport sizes after each significant change, then compare the images or PDFs in your review system. A screenshot is evidence of appearance, not proof that authentication, authorization, analytics consent, or error handling works; test those behaviors separately.

7. Deploy deliberately

  1. Configuration: set production environment variables in the host’s secret store, not in the repository. Confirm the production API base URL and allowed origins.
  2. Domain and DNS: verify ownership, certificate issuance, redirects, canonical URLs, and email records before announcing the site. A custom domain requires a domain you own and the ability to change its DNS records.
  3. Data and caching: choose cache headers intentionally, purge stale assets when necessary, and document what data is retained and for how long.
  4. Observability: enable privacy-conscious logs, track errors and latency, and alert on failed health checks or rising costs.
  5. Rollback: keep the previous build available, record the commit and configuration for each release, and rehearse restoring it.
  6. Release: review the live URL as an unauthenticated user and as each supported role. In ChatGPT Sites, save a version and review it before deployment because deployment URLs are production URLs.

8. Managed builder versus code-first: a practical decision

Choose a managed workflow when the site is mostly content, the supported templates and integrations meet your needs, and speed matters more than portability. Choose a repository-based workflow when you need a framework or service the managed product does not support, private networking, a database, background processing, custom authentication, detailed tests, or control over hosting and data flows.

When comparing providers, evaluate source-code control, framework and service support, private-network access, hosting and domain control, testing and observability, data handling, model choice, recurring model or hosting cost, and how easily you could migrate if the provider changes. Do not assume a feature, rate limit, model snapshot, plan allowance, domain option, or price will remain unchanged; verify it at the time you build.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

9. Troubleshooting common LLM-built-site failures

The model keeps rewriting unrelated files

Cause: the request has no boundary. Fix: name the exact files, state what must not change, request a diff, and require a short list of touched paths.

The page looks fine on desktop but breaks on phones

Cause: the model optimized for one viewport or used fixed widths. Fix: provide explicit breakpoints, test narrow widths, replace fixed dimensions with responsive constraints, and check long words, tables, menus, and images.

A form appears secure but can be bypassed

Cause: validation exists only in the browser. Fix: validate and authorize again on the server, use rate limits, and return generic errors that do not disclose sensitive details.

Production requests fail while local requests work

Cause: missing environment variables, incorrect origins, DNS, certificates, serverless timeouts, or a different build command. Fix: compare sanitized configuration, inspect deployment logs and browser network errors, verify DNS and allowed origins, and test the production endpoint directly.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Generated code introduces a vulnerable or unnecessary package

Cause: the model selected a familiar dependency without checking your stack. Fix: ask why it is required, remove it if the platform already provides the capability, review its permissions and advisories, and regenerate the lockfile.

Visual regression screenshots are inconsistent

Cause: animations, ads, consent dialogs, dynamic data, fonts, or lazy images change between captures. Fix: freeze test data, wait for a stable selector or network idle, disable animation in test CSS, load fonts deterministically, and remove overlays before comparison.

10. Performance, reliability, and cost controls

  • Ask the model to measure before optimizing: identify the largest assets, slow requests, layout shifts, and client-side bundles.
  • Prefer server-side rendering or static generation where it suits the content, and lazy-load below-the-fold media without harming keyboard or screen-reader access.
  • Cache immutable assets, set explicit image dimensions, and avoid polling when an event or webhook is sufficient.
  • For model calls, set timeouts and retry only safe operations. Track token or API spend, latency, error rates, and user-visible fallbacks.
  • Keep prompts and model versions under review. A prompt change can alter generated code or production behavior just as a dependency change can.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Or skip the browser setup

For repeatable visual checks, ScreenshotNeo is a website screenshot API and MCP server for developers. It accepts a URL and returns PNG, JPEG, WebP, or PDF. Before capture, it can accept cookie or consent banners and remove more than 60 known consent platforms, newsletter popups, and chat widgets; each cleanup step can be disabled. Only clean shots are billed: bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits cost nothing, and response headers report the page verdict and billing status.

Use the documented parameters in the ScreenshotNeo API documentation. Replace YOUR_API_KEY and the example URL with your own values.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

cURL

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp

Python

import requests
r = requests.get("https://api.screenshotneo.com/v1/shot", params={"access_key": "YOUR_API_KEY", "url": "https://stripe.com"}, timeout=90)
r.raise_for_status()
open("shot.webp", "wb").write(r.content)

Node.js

const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);
if (!res.ok) throw new Error(`Screenshot failed: ${res.status}`);
const fs = await import('node:fs/promises');
await fs.writeFile('shot.webp', Buffer.from(await res.arrayBuffer()));

ScreenshotNeo also supports full-page capture with lazy images loaded, CSS-selector element capture, dark mode, 12 device presets plus custom viewports, retina scale, PDF paper size and page ranges, HTML/CSS-to-image, custom JavaScript and CSS, click-before-capture, selector waits, delay or network-idle waits, blocking ads, trackers, requests or resource types, custom headers, cookies, user agents and Authorization, timezone and geolocation, transparent backgrounds, resizing, chosen cache TTLs, signed links, asynchronous jobs with signed webhooks, bulk capture for up to 100 URLs per call, a usage API, an OpenAPI specification, and familiar parameter names for easier migration. Its MCP server exposes take_screenshot, get_page_info, and capture_pdf to Claude, Cursor, and other MCP clients.

Pricing is Free for 1,000 shots per month with no card, then Starter $5 for 3,000, Growth $15 for 15,000, Pro $39 for 60,000, Scale $99 for 250,000, and Business $249 for 1,000,000. Yearly billing gives two months free, and every feature is on every plan. See ScreenshotNeo and sign up free to get 1,000 screenshots a month without a card.

11. FAQ

Can an LLM publish a website with no coding?

A managed builder can handle much of the implementation and publishing for a lightweight site, but you still need to supply requirements, review the preview, verify content and behavior, and treat the deployment as production.

Should I give the model my whole repository?

Only when the tool, provider terms, access controls, and data architecture permit it. Minimize sensitive files, remove secrets, and provide the smallest context that lets the model complete the task.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

How do I keep an AI-generated site maintainable?

Use version control, small diffs, automated checks, documented assumptions, pinned dependencies where practical, and prompts stored with the code. Review generated changes as you would any human-written change.

Is generated code guaranteed to be correct?

No. It is a draft that can contain accessibility defects, insecure authorization, broken edge cases, licensing problems, or unnecessary dependencies. Tests and human review remain mandatory.

Frequently Asked Questions

Can an LLM publish a website with no coding?

A managed builder can handle much of the implementation and publishing for a lightweight site, but you still need to supply requirements, review the preview, verify content and behavior, and treat the deployment as production.

Should I give the model my whole repository?

Only when the tool, provider terms, access controls, and data architecture permit it. Minimize sensitive files, remove secrets, and provide the smallest context that lets the model complete the task.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

How do I keep an AI-generated site maintainable?

Use version control, small diffs, automated checks, documented assumptions, pinned dependencies where practical, and prompts stored with the code. Review generated changes as you would any human-written change.

Is generated code guaranteed to be correct?

No. It is a draft that can contain accessibility defects, insecure authorization, broken edge cases, licensing problems, or unnecessary dependencies. Tests and human review remain mandatory.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. Shenzhen desk3 min
    HONOR Expands Beyond Smartphones With Humanoid Robot RevealHONOR said it unveiled its first humanoid robot at MWC 2026 and named shopping assistance, workplace inspections, and supportive companionship as intended uses. Later Robotics D1 claims and a reported…
  2. Cupertino desk5 min
    Apple Unveils AirPods Max 2: The Upgrade That Should Have Happened Years AgoAirPods Max 2 adds H2-powered audio features and Apple claims up to 1.5× more effective ANC, but its design, Smart Case, and 20-hour battery rating are unchanged. Wired lossless audio…
  3. Cupertino desk4 min
    Apple’s OLED Touch MacBooks Are Coming—but the Dynamic Island Is the Real GambleApple has not announced an OLED touchscreen MacBook, but reports point to high-end models arriving in late 2026 or early 2027. The reported Mac Dynamic Island could be useful, but…
Recommended PC Tool
Recommended PC Tool
Outdated Drivers Are Slowing You DownFree scan - exact matches
Windows Errors? Fix Them Before They SpreadFree repair scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.