Astro is one of the fastest ways to build a website. It renders pages to plain HTML when the site is built, so visitors get finished pages with little or no JavaScript, and it powers documentation, marketing sites, and blogs for teams that care about speed.
It is also a developer framework. Building with it the usual way means a code editor, the command line, and Git. An Astro website builder takes that work off your hands. This guide explains what these builders do, how they compare to building by hand, what speed you can actually expect, and what to check before you launch.
What is an Astro website builder?
Astro is a web framework that renders pages to HTML at build time. JavaScript loads only for the parts of a page that need it. An Astro website builder creates the pages, layouts, components, content, and build configuration for you, and the result is the same kind of Astro project a developer would write. Builders come in three broad kinds:
- Astro themes and starters. A designed project you download and fill in yourself in code.
- Visual editors for Astro. A CMS or page builder connected to an Astro repository that a developer already set up.
- AI Astro site generators. You describe the site and the tool writes the whole project, including copy, design, and SEO metadata.
The output is the same in every case: a static Astro site generator project that can be hosted cheaply and edited by any developer who knows Astro. Pagesmith, which we build, is an AI generator with a visual editor and hosting included, and we use it as the worked example later in this guide.
Why build a website on Astro
Many site builders and JavaScript frameworks send an application bundle to every visitor, and the browser has to download and run it before the page is usable. Astro sends HTML first. A component that needs interactivity, such as a booking widget or an image carousel, becomes an island that loads its own JavaScript, and the rest of the page stays plain HTML.
Claims like “Lighthouse 100” are easy to make, so we measured. These are two published Pagesmith templates, tested with Lighthouse (mobile, simulated slow 4G) on November 5, 2026:
| Template | JavaScript files | Page weight | LCP | Score |
|---|---|---|---|---|
| Roofing company | 0 KB | 241 KB | 2.2 s | 98 |
| Bakery | 0 KB | 556 KB | 5.1 s | 73 |
Both pages load zero JavaScript files and have no layout shift. The difference in Largest Contentful Paint comes from fonts and images: the bakery page loads a Google Fonts stylesheet that blocks rendering and pulls its hero photo from a remote image host. Astro gives you a fast starting point, and the assets you add decide the final speed. The common mistakes section covers how to avoid both problems.
Building Astro by hand vs with a builder
A hand-built Astro site starts in the terminal:
# Scaffold a project (the CLI asks for a starter template)
npm create astro@latest my-site
# Run the dev server at http://localhost:4321
cd my-site
npm run dev
# Build the static output into dist/
npm run build
After that you write every page in .astro syntax, write the copy and SEO tags, set
up a repository, and connect a host. None of it is hard for a developer, and together it takes a
day or more before the copy is done. With an AI builder you describe the site instead, for
example “a website for a two-person accounting firm in Denver that does small business taxes
and bookkeeping”, and review the generated result.
| What you need | Astro by hand | AI Astro builder |
|---|---|---|
| Project setup | Install Node.js, run the CLI, pick a starter | Generated from a description or URL |
| Designed pages with copy | Write and style every page | Generated, then refined |
| Existing site | Rebuild it page by page | Imported |
| SEO metadata and JSON-LD | Add to each page yourself | Written for every page |
| Editing for non-developers | Set up a headless CMS | Visual editor |
| Hosting, domain, and SSL | Configure a host and DNS | Managed |
Hand-coding gives you control over every line. A builder gives you the same kind of project in minutes. If the builder lets you export the code, you can switch to hand-editing at any point. To compare builders on free plans, speed, and code export, see the best AI website builders compared.
What a generated Astro project looks like
Whether a developer types it or a builder generates it, an Astro project has the same shape. This is the structure of a Pagesmith site after export:
├── astro.config.mjs
├── package.json
├── src/
│ ├── components/ # Header, Footer, Hero, sections
│ ├── layouts/ # BaseLayout, BlogLayout
│ ├── pages/ # One file per URL
│ │ ├── index.astro
│ │ ├── about.astro
│ │ └── blog/[...slug].astro
│ ├── content/blog/ # Posts as Markdown or MDX
│ ├── content.config.ts
│ └── styles/global.css
└── public/ # favicon, robots.txt, images
A page is HTML with a frontmatter block between two --- fences. The code in the
frontmatter runs once at build time and never reaches the browser:
---
import BaseLayout from '../layouts/BaseLayout.astro';
const services = ['Tax preparation', 'Bookkeeping', 'Payroll'];
---
<BaseLayout title="Services" description="Small business accounting in Denver">
<h1>What we do</h1>
<ul>
{services.map((service) => <li>{service}</li>)}
</ul>
</BaseLayout> Pagesmith sites use Astro 7, Tailwind CSS 4, and content collections with a frontmatter schema for blog posts. Titles, meta descriptions, canonical URLs, Open Graph images, a sitemap, and JSON-LD structured data are written for every page.
How Pagesmith builds an Astro site
Here is what happens from the first prompt to a published site.
- Describe the site or paste its current URL. A sentence or two is enough to start. To move an existing WordPress, Wix, Squarespace, or Webflow site, paste its address and choose Preserve to keep the design or Enhance to keep the content and apply a new design. Pagesmith finds your other pages from the sitemap and navigation and imports the ones you confirm. How a WordPress import works.
- Pagesmith writes the Astro project. It plans the pages, writes the copy and SEO metadata, picks a design system, and generates the components, layouts, and content collections shown above. You review it on a preview URL before anything is public.
- Edit in plain English or in the visual editor. Ask for changes like “add a pricing page with three plans” and the editor updates the Astro files. Astro has no built-in CMS, so Pagesmith adds a visual editor and article editor on the same project. Invite a client or teammate and give them view-only, editing and publishing, or full access. Astro CMS walkthrough.
- Add forms and server features when you need them. Contact forms deliver to your inbox on every paid plan. Eligible plans add a managed database and a secrets manager for API keys. Pages with server code run on demand, and every other page stays pre-rendered HTML.
- Publish, and keep the code. Sites publish on Cloudflare, and paid plans from $9/month connect a custom domain with automatic SSL. Every edit is committed to Git, you can push the project to your own GitHub repository, and Pro and higher plans can export the full Astro repository. Code export.
Hosting an Astro site
A static Astro build is a folder of HTML, CSS, and images, so almost any host can serve it,
often for free. If you host it yourself, set the build command to npm run build
and the output directory to dist. Pages with server code, such as a form handler,
also need the adapter for your host, for example @astrojs/cloudflare.
On Pagesmith, hosting is part of the plan: every site gets a preview URL on Cloudflare, and the Free plan needs no credit card. Custom domains start on the $9/month plan. See pricing for the full list.
Common mistakes that slow down an Astro site
Astro is fast by default, and a few choices can still cost seconds on a phone. These are the ones we see most often, including in our own templates.
Render-blocking font stylesheets
A Google Fonts stylesheet in the head blocks the first paint until it downloads from another origin. In the bakery test above, Lighthouse estimated 1.85 s of savings from that one request. Self-host the font files, preload the one used above the fold, and limit the weights you load.
Hero images from a remote host
A hero photo hot-linked from an image service needs a new connection before it can start downloading. Put the image in the project and use Astro’s <Image /> component so it is resized, converted to a modern format, and given width and height. Mark only the hero image as high priority.
Hiding the headline behind an entrance animation
Fade-in effects often start the hero heading at opacity 0. The browser does not count invisible text as painted, so Largest Contentful Paint waits for the animation. We fixed this in our own templates in 2026: keep the first screen visible on load and animate content further down the page.
Adding client:load to every component
Each client: directive ships that component’s JavaScript. Leave static components without one, and use client:visible or client:idle for widgets that can wait.
Third-party scripts in the head
Chat widgets, tag managers, and ad pixels can outweigh the whole page. Load them after the page is interactive, or only on the pages that use them.
Checklist before you launch
- Every page has its own title tag, meta description, and canonical URL.
- A sitemap, robots.txt, favicon, and Open Graph image are in place.
- Old URLs redirect to their new pages if you moved from another platform.
- Forms send to a real inbox from the live site, tested after publishing.
- Lighthouse mobile performance is checked on the published URL, since localhost results are faster than real visits.
- The site loads over HTTPS on the custom domain, with and without www.
The bottom line
Astro produces fast, low-maintenance websites, and the main barrier has been the developer skills needed to build one. If you enjoy the process and want control of every line, build it by hand with the commands above. If you want the same kind of project in minutes, generate it, review it, and keep the code.
Frequently asked questions
What is an Astro website builder?
An Astro website builder is a tool that creates websites with the Astro framework for you. Instead of writing .astro components, layouts, and build settings by hand, you describe the site or start from a template, and the builder produces a standard Astro project that is rendered to HTML at build time.
Do I need to know how to code to build an Astro site?
Building Astro by hand needs HTML, CSS, the command line, and Git. With an AI builder such as Pagesmith you describe the site or paste the address of your current one, then change it in plain language or in a visual editor. Developers can still open and edit the code.
Is Astro a good choice for a small business website?
Usually, yes. Astro renders pages to HTML ahead of time, so a typical business site has no plugins or server code to patch and loads little or no JavaScript. Speed still depends on images, fonts, and third-party scripts, so test the published page on a phone connection.
Can I move my existing website to Astro?
Yes. Paste the URL of your current site and Pagesmith imports it as an Astro project. Preserve keeps the current design, and Enhance keeps the content and applies a new design. You confirm which pages and posts to import. How a WordPress import works.
Does Pagesmith include an Astro CMS?
Yes. Pagesmith adds a visual CMS on the generated Astro project so clients and teammates can edit pages and publish articles without Git. Invite collaborators from site settings and assign a role. See the Astro CMS walkthrough.
Can I export the Astro code and self-host?
Yes, on Pro and higher plans. The export is a standard Astro repository with its package file, configuration, components, layouts, and content. Review its integrations and environment requirements before moving it to another host. Code export details.
Where are Pagesmith Astro sites hosted?
Pagesmith publishes sites on Cloudflare and includes a preview URL for every site. Paid plans can connect a custom domain with automatic SSL. You can also export the project and deploy it to any host that supports its build and runtime requirements.
Does Pagesmith support Astro content collections?
Yes. Blog and article pages use Astro content collections with frontmatter schemas, collection configuration, and dynamic routes, so posts stay type-safe and follow the standard Astro content workflow.
Can I add Astro integrations to a Pagesmith site?
You can ask the editor to add an integration, or export the project on an eligible plan and add one in code. Check the generated configuration and the integration's own setup instructions before publishing.