404 page with status code

Hi there!

I am in the process of finishing up my custom 404 page (not yet in production). My application is build with Vue 2 and for any page that does not match my routing structure I redirect tot my /404 page myrecipetoday.netlify.app/404.

All works fine in terms of the 404 page/logic itself. The last thing I need to do is also set a 404 status code for my 404 page. I am testing via the deploy preview, but am not able to find/set the right configuration in my _redirects file.

# Redirect default Netlify subdomain to primary domain
https://myrecipetoday.netlify.com/* https://www.myrecipe.today/en/:splat 301!

/* /index.html  200

Already tried all I could think of…

Thanks in advance!


With a SPA configuration, you cannot set a 404 status code for 404 pages. All the pages would always get a 200 status.

1 Like