Home > Back-end >  Next Js Home Page is giving me 404 Page not found
Next Js Home Page is giving me 404 Page not found

Time:11-09

enter image description hereJust started NextJS version 11.1 and all routes are working first time the website is launched. However when I click on the Home Page/index.js, I get the 404 Not Found. Any help here would be appreciated. Thanks

Here's the index.js code:

export default function Home() {
  return (
    <>
      <Head>
        <title>Home Page</title>
        <link rel="icon" href="/favicon.ico" /> 
      </Head>
      <Hero>
        <Heading>NEXT</Heading>
      </Hero>
    </>
  );
}

CodePudding user response:

Remove the "/index" from the Link and just add "/"

That is the default route for index.js

  • Related