0

On NextJS (deployed in Vercel), by default, the 404 error page is .com/404. I need to change it to .com/errors/404.

I've tried reading the docs (https://vercel.com/guides/custom-404-page) and even asking to ChatGPT o3-mini-high, and there is no answer at all.

My problem is that my app/website show user-pages on .com/xxx, and the app got viral sooner than expected (getnofilter.com), and somebody registered the "404" username, so now .com/404 should show the user instead of the error page. Like .com/brodanoel (.com/[username]).

I'm using NextJS 14, and with the old folder routing (/pages/[username]/index.js)

Thanks in advance!

PD.: Yes, I already registered the error user, so I don't have a problem with .com/error/404 hahaha

4
  • 1
    Are you running the app on Vercel? Commented Feb 6 at 14:19
  • @grekier, yes, sir. Commented Feb 6 at 18:47
  • 1
    Then you could have a vercel.json to use another file. See vercel.com/guides/… Commented Feb 6 at 19:50
  • Maybe you could use 307 redirects for it ? Commented Feb 16 at 22:26

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.