Next.js Discord

Discord Forum

Want to return status code 200 for /404 page

Unanswered
Pigeon tremex posted this in #help-forum
Open in Discord
Pigeon tremexOP
Hey, I want to return a normal page with status code of 200 for the /404 path
I have a pages/[code].tsxfile. By adding a pages/error.tsx file the /404 url does actually go to the /[code] route and renders the page fine, but still comes back with a 404 status code. I want it to return a 200 status code here. This has worked fine for /500 where it renders the page and returns a 200, but not for 404

0 Replies