Skip to content
Back

Subroute returns 404 on SPA with Appwrite sites

  • 0
  • Sites
othonas
17 Jun, 2025, 18:08

I am hosting an angular website using a self-hosted instance and appwrite sites. The problem I am facing is that when I open a link like domain.com/somepath the somepath should be handled from angular but now a 404 not found page is returned from appwrite sites. If I was using nginx I could add to location / { try_files $uri /index.html; } and this would fix the issue I am facing.

TL;DR
Angular website hosted on self-hosted instance with Appwrite sites is returning 404 errors for subroutes instead of being handled by Angular. Solution: Add ```location / { try_files $uri /index.html; }``` to configuration.
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