Next.js Discord

Discord Forum

How to return a 503 for maintenance page

Unanswered
Polar bear posted this in #help-forum
Open in Discord
Polar bearOP
I have a maintenance page for a site I'm working on. The response code should be 503 to indicate that the service is unavailable. (https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/503)

This is very important for SEO ranking!

I found the discussions on Github about this:
https://github.com/vercel/next.js/discussions/53225
https://github.com/vercel/next.js/discussions/52378

It does not matter to me if I need to do this in middleware or layout or page. Just a 503...

Any help is much appreciated!

0 Replies