Built-in 404 Error in NextJS
Let's say a user entered a URL in the browser's address bar that does not exist on our website. In this case, we must show them an error page.
In addition, we must return an HTTP status
with the code 404 - this is important for SEO, so that
search engines that followed a broken link
understand that such a page does not exist.
In NextJS, this is done automatically. Try it!
Enter a non-existent address and you will see
an error page. If you open
the browser's debugger and open the Network tab,
you will see the 404 response status.
Perform the described manipulations.