What is Astro and why we build websites with it

Astro ships pages as plain HTML and adds JavaScript only where needed. What that means for speed, security and cost, and where we do not use it.

3 minread 760words last updated

The short answer

Astro is a web framework for building content-driven websites. Its defining idea is simple: a page should be plain HTML unless a specific part of it genuinely needs to be interactive. Astro produces that HTML at build time and adds JavaScript only to the parts that need it, as small islands.

The result is a website that the browser can show immediately, on any device, before a single script has been downloaded. That is the whole reason we use it, and it is worth understanding why it matters.

Why “zero JavaScript by default” matters

Most website slowness on phones is not the network and not the images. It is JavaScript: code the browser must download, parse and run before the page becomes usable. Frameworks that render everything with JavaScript ship all of it to every visitor, whether the page has a form or is a plain article.

Astro flips the default. The page is HTML. If a search box or a contact form needs script, that component gets its own small piece, loaded when the page loads, when it scrolls into view, or when the visitor first interacts with it. Everything else stays script-free.

Diagram of a page wireframe: header, hero, text sections and footer are plain HTML and CSS without JavaScript. Two small islands, a search box and a contact form, load their own small script only when needed.
Islands architecture: the page is static, and only the interactive parts load script, each on its own terms.

What that means in practice

ForWhat changes
Your visitorsPages appear immediately, also on mid-range phones over mobile data. Text never jumps while scripts load.
GoogleCore Web Vitals land in the “good” range by default rather than after weeks of tuning.
SecurityThere is no public admin and no plugin running in front of visitors. The attack surface is the content, not a server.
Hosting costFinished files on a CDN. Low, predictable, and unaffected by traffic spikes.
Your teamContent lives in files or a content system of your choice. Publishing triggers a build; nobody touches a server.
Leaving usThe output is standard HTML, CSS and assets. Any host can serve it, and the source is in a repository you own.

Where the content comes from

Astro does not care where content lives. For a company website with a dozen pages, content can sit in files next to the code. For a knowledge base like this one, content is a folder of markdown articles with strict rules, validated on every build. For a marketing team that publishes daily, we connect a headless content system with an editor interface, and the build runs automatically on publish.

Where we do not use it

Astro is built for websites, not applications. If most pages depend on who is logged in, if data changes by the second, or if the product is a portal or a dashboard, we build it with an application framework, currently Next.js, and host it accordingly. Astro can carry small interactive islands very well; it is not meant to be a whole app.

What this means for you

You do not need to choose a framework. You need to know the questions: does the page arrive as finished HTML, how much script does a visitor download for a plain article, and can you take the output and the source with you? Astro answers all three the way a business should want. If your current site cannot, that is a conversation worth having before the next redesign.

Written by the CivSec S.M.A.R.T team

We build and run websites, software and AI systems for businesses. We write about what we see in that work, in plain language, and we update articles when things change.

Last checked . Spotted something outdated? Tell us.

Frequently asked questions

Is Astro a content management system like WordPress?

No. Astro is the framework that builds the pages. Content can come from files, from a headless content system, or from an API. WordPress combines both roles in one server-rendered product; Astro separates them, which is a large part of why it is faster and easier to secure.

Can non-technical people edit an Astro website?

Yes, through a content system connected to the build, or through simple content files. Editors publish, a build runs, the site updates within minutes. The editing experience depends on the content system we pair it with, not on Astro.

Is Astro mature enough for a business website?

It is an established open-source framework with regular releases and a large ecosystem, used from personal blogs to large documentation and marketing sites. This website and this knowledge base run on it. As with any tool, the quality of the result depends on who builds with it.

When do you not use Astro?

When the product is an application rather than a website: a client portal, a dashboard, a booking engine, anything where most pages depend on who is logged in. For those we use Next.js. Astro can host small interactive islands; it is not designed to be the whole app.

Sources

  1. Astro documentation: Why Astro? (accessed 2026-09-11)
  2. Astro documentation: Islands architecture (accessed 2026-09-11)
  3. Google web.dev: Web Vitals (accessed 2026-09-11)