Joe Chip
Joe Chip2w ago

Astro 404 page not working

I'm deploying a static site built with Astro on Deno Deploy. With Astro, you can create a 404.astro page that will be used when a page is not found. This currently isn't working in Deno Deploy. Is there a way to configure this on Deno?
1 Reply
Deno AI Helper
I wasn't able to find the answer to your question in the official Deno documentation. However, based on the information you've provided, it's important to ensure that your Astro project is correctly set up to handle 404 pages when deploying to Deno Deploy. Astro should generate a 404.html page from your 404.astro file during the build process. Make sure that this file is being generated correctly in your output directory. Additionally, Deno Deploy should serve the 404.html page when a route is not found, but this behavior might not be automatic depending on how you've configured your project. Please note that this advice is not based on the Deno documentation, and I would recommend double-checking the accuracy of this advice and consulting the Astro documentation or community for more specific guidance on handling 404 pages with Astro on Deno Deploy.