Next.js Discord

Discord Forum

Statically Generated Pages Response Code Change to 410

Unanswered
Asian black bear posted this in #help-forum
Open in Discord
Asian black bearOP
Hey guys,

I have a dynamic route where I generate lots of pages with getStaticPaths and getStaticProps, and for some routes, I want to return 410 response code if the fetched data is missing, I don't want it get redirected to /410 routes because a lot of redirections are made in the deployment system and this is not what we are looking for.

Can I just return 410 response code than 200 in this case without redirection to /410 route in Next.js?

0 Replies