Skip to content
Back

Static Astro site returns empty HTML on all routes except root on Appwrite Sites

  • 0
  • Sites
  • Web
  • Cloud
alexzabbey
10 Sep, 2025, 12:17

Environment

  • Appwrite Sites: Cloud
  • Framework: Astro v5.13.2
  • Output mode: Static (output: 'static')
  • Build command: npm run build
  • Output directory: dist

Problem Description When deploying a static Astro site to Appwrite Sites, all routes except the root (/) return empty HTML responses (<html><head></head><body></body></html>). The root route work perfectly.

Build Output Structure The Astro build correctly generates static files: dist/ ├── index.html (works at /) ├── test/ │ └── index.html (doesn't work at /test) └── _astro/ └── [assets]

Astro Configuration

// astro.config.mjs ` import { defineConfig } from 'astro/config'; import svelte from '@astrojs/svelte'; import tailwindcss from '@tailwindcss/vite';

export default defineConfig({ output: 'static', integrations: [svelte()], vite: { plugins: [tailwindcss()] } });`

Expected Solution Appwrite Sites should serve the correct static HTML files for allroutes, matching the file structure in the dist directory, similar to how other static hosting providers handle Astro sites.

TL;DR
Static Astro site deployed on Appwrite Sites is returning empty HTML on all routes except the root. The issue lies in the build output structure not aligning with how Appwrite Sites serve static files. Developers are advised to adjust the file structure in the dist folder to match route paths.
Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more