deploy_feedback icon indicating copy to clipboard operation
deploy_feedback copied to clipboard

[Bug]: Astro's distributed 404.html doesn't get loaded when a 404 is returned

Open Simbaclaws opened this issue 6 months ago • 0 comments

Problem description

Hi there,

I have a dist folder with a 404.html inside of it that is deployed to deno deploy.

However, all I'm seeing on the actual website is a:

<pre>Not Found</pre>

In the browser when I navigate to a 404 page, intead of the 404.html page that is generated by my astro build github workflow.

What are the steps to properly implement 404 pages on deno deploy if serving a static 404.html page isn't working out of the box?

Please help.

Steps to reproduce

  1. Create a Astro website
  2. create a 404.astro in src/pages
  3. create a deployment script in github workflow that connects to deno deploy
  4. when deployed it doesn't show your 404.astro page, which is build through the npm run build command in the dist folder as a static 404.html page.

Expected behavior

I should be seeing my custom 404 page...

Environment

github

Possible solution

No response

Additional context

No response

Simbaclaws avatar Jun 17 '25 19:06 Simbaclaws