1 year ago

#326232

test-img

jeff

404 page not working on Nextjs Static Generated File

Im having trouble to show 404 custom page i made when i generate static generated file (next build && next export)

When im navigating to non existing page ("/<any-non-existing"), it always redirects to homepage ("/"). My expectation is that it will automatically redirect to ("/404").

However, if im manually navigating to ("/404") page, the page works perfectly fine.

Deployed to S3 with Cloudfront Enabled next.config.js { trailingSlash: true }

next.js

404-page

0 Answers

Your Answer

Accepted video resources