A static website serves the same pre-built HTML pages to every visitor: each page is generated in advance and delivered as it is. A dynamic website builds pages when someone requests them, using server code (PHP, Node.js or Python) and usually a database, so a page can change for each visitor or each minute.
Think of a printed menu versus a dish cooked to order. The printed menu is ready before you sit down; the cooked dish is made for you, and takes kitchen work every time. Many real websites mix the two, and caching can let a dynamic site hand out a prepared copy without running its code again.
Choose around how fresh the data must be, whether pages differ per user, who edits the site and who runs it.
Static vs Dynamic Website: Key Differences
| Static website | Dynamic website | |
|---|---|---|
| When pages are made | In advance, at build or publish time | When a visitor requests the page |
| Same for every visitor? | Yes, the same files for everyone | Can differ by user, location, time or stock |
| Server code and database | None needed to serve a page | Server code on each uncached request, usually with a database |
| Updating content | Edit the files or a connected CMS, then rebuild | Edit in the admin; the change shows on the next request |
| Typical speed | Fast by default, served from a CDN | Fast with good caching; slower on uncached or heavy pages |
| Security surface | No public database or admin login on the live site | Login, database and plugins need regular updates |
| Hosting | Usually cheap file or CDN hosting | Server or managed hosting that runs code |
| Best for | Service pages, blogs, portfolios, documentation | Shops, accounts, bookings, social and member features |
These are typical setups, not rules. A well-cached WordPress site can be quick, and a static site loaded with large images and scripts can be slow, so test the pages you actually publish.
What Happens When Someone Visits?
| Delivery path | Request flow | Useful for |
|---|---|---|
| Pre-rendered page | Browser → CDN or web server → prepared HTML | Public content shared by visitors |
| Cached dynamic page | Browser → cache → stored response, if valid | Public content generated by a CMS or application |
| Uncached dynamic page | Browser → application → data source if needed → response | Fresh or user-specific output |
| Static page with live component | Browser → prepared page; component → API | A stable page with a live booking, price or account feature |
All four paths still need the browser to download and process the page’s images, styles, fonts and scripts. A quick HTML response does not make a heavy page instantly usable.
What Is a Static Website?
A static website is a set of ready-made HTML files. A build process combines templates and content into those files, and the host hands the same file to everyone who asks for that page. Astro, Hugo and other generators can use this model. Blogs, case studies, service pages and portfolios often fit it because the published content is shared across visitors.
Static describes delivery, not whether a page has animations or buttons. A pre-rendered page can contain JavaScript and submit a form to a service. That service is a separate runtime dependency and needs its own access controls, validation and monitoring.
When content changes, the publishing process must regenerate or replace the affected output. Demonstrate how editors preview and publish, how long a realistic build takes, and what happens if it fails.
A modern static site can still include:
- blog posts and articles built from Markdown or a CMS
- contact and newsletter forms sent to a form service or endpoint
- galleries, portfolios, pricing and service pages
- animations, calculators and other browser-side interactive parts
- site search from a prebuilt index and several languages
What Is a Dynamic Website?
A dynamic website runs code on the server to build each page when it is requested. That application can build a response using the request, a user’s session and current data. A database is common but is not mandatory for every dynamic request.
WordPress uses PHP and a database, but its documented optimization options include caching. It is inaccurate to assume every WordPress visit repeats all page rendering and database work. Other managed platforms also combine caching, server rendering and browser-side features.
The operational challenge is deciding which output may be reused, for how long, and for whom. Private account data must not leak into a shared cache. Inventory and checkout require a clearly defined source of truth, regardless of how product descriptions are delivered.
Examples of Static and Dynamic Websites
Good fits for a static build (built with a static site generator; the same site on WordPress is dynamic, even behind a page cache):
- a brochure site for a plumber, dentist or law firm
- a portfolio or case-study site
- a documentation or help site
- a campaign landing page
- a blog or content site built with Astro, Hugo or Eleventy
Need request-time work (these can still pre-build their public pages and run only the dynamic parts on a server):
- an online store’s carts, stock and checkout, such as a WooCommerce or Shopify shop
- a social network or community forum
- a booking or appointment system
- a customer or member area behind a login
- a news site that personalises its front page
Many sites are hybrids. This website is one: its pages are pre-built with Astro, while the contact form and the checks behind our free tools run through server endpoints when someone submits them.
Speed: Test the Page and the Request Path
Pre-rendering can avoid request-time application work. A cache hit can deliver a dynamically generated page similarly. Cache misses, geographic distance, backend work, images and scripts all affect the result.
Compare representative URLs under the same test conditions, including cache hits and misses where relevant. Use repeated laboratory runs to diagnose problems and field data to understand visitors’ experience. Our performance checker is a starting point, not proof of every user’s experience.
Core Web Vitals use seconds for LCP, milliseconds for INP and a unitless CLS value. They are not a 0–100 framework score. Lighthouse provides a separate laboratory performance score. Sources checked 2 October 2026.
Security: Count the Actual Boundaries
Pre-rendering can remove a public CMS login and page-rendering application from ordinary delivery. It does not remove hosting credentials, dependencies, builds, third-party scripts or connected services.
Dynamic applications have more runtime behavior to protect, but well-maintained authentication, authorization, input handling, updates and monitoring matter more than calling a platform inherently unsafe. For either model, record who maintains each component and how access is revoked or restored.
SEO and AI Discovery: Inspect the Output
Either architecture can provide crawlable HTML, useful content, correct metadata, canonical URLs and accessible links. Either can also publish broken pages or accidentally block crawlers.
Google’s page experience guidance, checked 2 October 2026, does not promise rankings for good performance scores. Rendering choice does not guarantee search visibility or AI citations. Use the GEO guide to separate access from observed results.
Cost: Compare the Same Scope
| Cost area | Static delivery may require | Dynamic delivery may require |
|---|---|---|
| Hosting | File delivery, bandwidth, builds | Runtime capacity, caching and sometimes a database |
| Editing | Repository workflow or connected CMS | Integrated editor or separate CMS |
| Features | APIs or services for dynamic behavior | Application features and integrations |
| Maintenance | Dependency, account and integration reviews | Those reviews plus application/database operations |
| Recovery | Source, configuration and external-data recovery | Source, configuration and runtime-data recovery |
No cell is automatically free. Commercial plan terms, editor seats, traffic, developer time and support can change the comparison. Ask for a quote with the same content, features and maintenance period. See our website cost guide.
Content Management and Complex Features
An integrated WordPress dashboard may fit a team already using its publishing and plugin workflow. A headless CMS can give an Astro site a non-technical editor, previews and approval steps, but these must be scoped and tested.
Product count is not a reliable cutoff. A large catalogue with stable descriptions may use static pages; a small shop with complex stock, pricing or account rules may need substantial backend logic. Choose the commerce system and editing workflow first, then decide how each page is delivered.
The Hybrid Option
Astro’s rendering documentation, checked 2 October 2026, describes pre-rendered and on-demand routes. Interactive components can also run in the browser. These are different decisions: an interactive calculator does not necessarily require server rendering, while a private account page usually requires runtime authorization.
A practical design might pre-render service pages, process enquiries through a protected endpoint, and render a customer area on demand. The mix should follow requirements, not an arbitrary static/dynamic percentage.
A Decision Checklist
- Identify freshness: Which information may wait for a publish/build, and which must be checked at request time?
- Identify privacy: Which pages or responses differ by user and require authorization?
- Demonstrate editing: Can the actual editors publish, preview and recover an error?
- Measure delivery: Compare representative pages, scripts and integrations under agreed conditions.
- Price operations: Include hosting limits, maintenance, monitoring and recovery.
- Plan migration: Preserve URLs or map redirects, verify content and test conversions before launch.
Our Wellington House Repiling case study documents one rebuild’s measured outcome. It is evidence about that project, not proof that every platform switch improves performance.
For a business-specific assessment, read Is Astro right for your business? or discuss your requirements with us.
Frequently asked questions
What is the difference between a static and dynamic website?
A static website serves the same pre-built HTML pages to every visitor. A dynamic website builds each page when it is requested, with server code and usually a database, so the page can change by visitor or by the minute. Many sites mix both.
Is a static website good for business?
Static delivery can fit public service pages, articles and portfolios. Check data freshness, editing, integrations and operations before choosing.
Is WordPress static or dynamic?
WordPress is a dynamic CMS, but page caching can serve prepared HTML without rendering every request. Measure the configured site rather than assuming every visit queries the database.
Is Astro a static site generator?
Astro can pre-render pages and also render routes on demand with an appropriate adapter. Browser-side interactive components are another independent option.
Can a static website have a blog?
Yes. Articles can come from files or a CMS and be built into static pages. Publishing speed and the editing workflow depend on the setup.
Can a static website have a contact form?
Yes. The form submits to an API or form service. That runtime component needs validation, abuse protection and delivery monitoring.
Are static websites cheaper than dynamic websites?
They can reduce runtime hosting work, but total cost includes builds, CMS seats, integrations, support and maintenance. Compare the same scope and current provider terms.
Which is better for SEO, static or dynamic?
Either can rank. Content, crawlability, metadata and actual page experience matter; static delivery alone does not guarantee rankings or AI citations.
What are examples of dynamic websites?
Online stores with carts and live stock, social networks, booking systems, web apps with logins and news sites with personalised feeds. Facebook, Amazon and a typical WordPress or WooCommerce site are dynamic; a brochure site, portfolio or documentation site built with Astro or Hugo is usually static.
Is HTML static or dynamic?
Neither: HTML is the markup every website sends to the browser. A static site serves HTML files that were written or generated in advance, while a dynamic site generates the HTML on the server for each request with a language such as PHP, Node.js or Python.
What are the advantages and disadvantages of a static website?
Advantages: pages are fast to deliver from a CDN, there is no public database or admin login to attack, and hosting is usually cheap. Disadvantages: content changes need a rebuild or a CMS connected to the build, and logins, carts or personalised pages need a server or a third-party service.