Skip to content

Page not found error

Fix the page not found error so you can get your web project working.

Page not found error example

The most common cause of a page not found error is a missing file. Read on for possible missing files and how to fix this.

Netlify requires some kind of index.html file to be present in the publish directory to serve your web project. If you don’t have one, create this file in your web directory and try again.

To check files from your deployed project, you can use the Deploy File Explorer:

  1. From your project overview, in the left sidebar, choose Deploys.
  2. Select your latest published production deploy. This will be the deploy that your production site/app is live at.
  3. Under your Deploy summary and Deploy log, review the file structure under Deploy File Explorer.

Incorrect publish directory or no publish directory

Section titled “Incorrect publish directory or no publish directory”

Netlify requires a publish directory to be specified in your Netlify project settings.

To check your publish directory:

  1. Go to Project configuration Build settings.
  2. Choose Configure and enter your publish directory. If you’re not sure which directory, you can check your web framework’s guidelines or try using public or dist as your publish directory. Publish directory example in Build settings UI
  3. Confirm your changes.

To check for missing files in your deploy, use Netlify’s Deploy File Explorer.

Incorrect configuration or routing for your framework

Section titled “Incorrect configuration or routing for your framework”

It’s possible your project is using a framework that is not routed correctly or set up correctly for use with Netlify.

We recommend you verify your routing configuration matches your deployment setup, such as your _redirects file or publish directory.

To check your publish directory:

  1. Go to Project configuration Build settings.
  2. Choose Configure and enter your publish directory. If you’re not sure which directory, you can check your web framework’s guidelines or try using public or dist as your publish directory. Publish directory example in Build settings UI
  3. Confirm your changes.

Single Page Application redirect rule needed

Section titled “Single Page Application redirect rule needed”

If your project is a Single Page Application (SPA), you may need to add a redirect rule to your _redirects file to ensure that all routes are handled by your SPA.

Add the following to your _redirects file:

/* /index.html 200

Learn more from our Verified Support Guide.

There are even more causes for a page not found error. Learn more about additional causes and troubleshooting tips in our Verified Support Guide on Page not found errors.

You can also reach out to Netlify Support for additional help at Netlify Support.