A business website should be fast, secure, inexpensive to operate, and easy to maintain. These properties depend largely on how the site is built.

We built this website using Astro, a modern framework that generates static HTML files. We store these files in Amazon S3 and deliver them through Amazon CloudFront, a global content delivery network. This architecture eliminates much of the complexity associated with traditional web hosting.

Speed and Flexibility

Astro generates each page before publication rather than assembling it whenever a visitor requests it. CloudFront distributes the finished files across its global network, allowing visitors to retrieve pages from servers geographically close to them.

The result is a website that loads quickly without requiring a database or server-side application to generate each page.

Astro also gives developers considerable flexibility. Reusable components make it possible to build sophisticated page layouts while maintaining a consistent design. Developers can use modern JavaScript frameworks where interactive features are necessary without requiring the entire website to run as a dynamic application.

Security

Traditional content management systems such as WordPress execute server-side code to generate pages. WordPress relies on PHP, a database, and often third-party plugins. Each component introduces potential security vulnerabilities.

Attackers frequently exploit vulnerabilities in PHP applications to install web shells, malicious scripts that allow unauthorized commands to execute on a compromised server.

Static websites eliminate this class of vulnerability from the public website. S3 stores files but does not execute PHP or other application code. CloudFront delivers those files without running a content management system.

Static hosting does not eliminate every security risk. Access to the AWS environment and the process used to publish files must still be protected. AWS Web Application Firewall can provide additional protection by filtering malicious requests and restricting access by geographic location.

Maintenance

WordPress requires regular updates to its core software, plugins, PHP runtime, and supporting infrastructure. Security vulnerabilities can require immediate attention, even when no changes to the website are planned.

Static hosting removes most of these maintenance obligations. AWS maintains the infrastructure supporting S3 and CloudFront. There is no web server, database, or WordPress installation for the website owner to patch.

Changes to the website are published by generating a new set of files and deploying them to S3. The framework and development dependencies still require periodic maintenance, but the public website has substantially fewer moving parts.

Cost

Traditional hosting requires computing resources to run application code, even when traffic is low. Static hosting requires only file storage and content delivery.

Amazon S3 charges for storage and requests. CloudFront charges for content delivery and requests, subject to AWS pricing and applicable free allowances. For a modest business website, these costs can be very low.

There is no continuously running application server, no database instance, and no WordPress hosting subscription.

A Simpler Architecture

The principal advantage of static hosting is not any single improvement in speed, security, maintenance, or cost. It is that one architectural decision improves all four.

Not every website can be entirely static. Applications that require authenticated transactions, frequently changing private data, or complex server-side processing need additional services. Even then, static pages can form the public interface while separate services handle dynamic operations.

A company website rarely needs the complexity of a continuously running application.

Does your organization maintain website infrastructure that serves no necessary business purpose? Oxer can help simplify it.