Skip to content
On this page

Routing SPA hosted in buckets

When hosting static files in buckets like S3, you might want to use the browser's history API for routing without relying on a server-side framework. This is especially useful for single-page applications (SPAs) or when you want to handle routing on the client side.

It's possible to upload a single index.html file to the bucket but it only get's served when the path is / or /index.html.

To get the browser to load the same html file for all paths, its possible to use a 404.html file in the bucket instead of index.html.

Made with ❤️ using the awesome vitepress