I still see "Page Not Found" Even though I have an index.html file

Hi I am having the common issue where I see “Page Not Found” after deployment. I looked at the [Common Issue] post but it doesn’t really solve my problem. I uploaded my project manually, and the source folder has an index.html file that corresponds to each page.

This is a summary of the deploy:


I would really appreciate any help on this as I have been searching everywhere and I can’t find any answers.

Thank you

remove those home folder and everyhing

server should be abel to access index.html directly.

index.html should not be in any folder.

2 Likes

To expand on svadukia’s response, you can have design/index.html, home/index.html, and about/index.html, but you also need an index.html file at the top level. Given your current organization, you could either add an index.html file at the top level so you’d have something like:

index.html
design/index.html
home/index.html
about/index.html

… or, if appropriate, you could move the index.html file from home/index.html to the top level, giving you this:

index.html
design/index.html
about/index.html

Note that you almost certainly will have to update your pages’ internal navigation links after making this change.

Alternately, I guess you could add a _redirect on netlify.toml file at the top level to send all requests to home/index.html (for example) from index.html, but that’s a messy way of doing things.

1 Like

You can load those files at https://yoursite/design/index.html and so forth. You’d want /index.html if you are seeing page not found:

1 Like

I moved the index.html out of the home folder and it worked! Thank you!

H, @salmae1118, thanks for letting us know which solution worked for you. :+1:

This sort of feedback does a lot to help others searching these topics in the future and we appreciate the follow-up!

hello, I am having the same issue and i am confused as to what to do

do you mean remove the folder from the folder in my system

i am not sure where i am supposed to remove index/html from

hi there, it needs to be at the root of whatever folder you told our interface is the publish directory.

Can you please explain like you are explaining to a 12 years old, I am new to programming. Please
By the way, I manually upload the folder and I have confirmed that the file uploaded is the correct one.

hi @Ifeoma , no worries, everyone starts somewhere! newbies are welcome around here for sure.

if you did a manual upload (also known as drag and drop deploy) then the folder you dragged and dropped should have an index.html in it at the top level, not within a sub folder. it needs to be called index.html exactly, (not someotherfile.html, not index.htm, not index.HTML etc)

if thats the case and it doesn’t load, could you please show us a screenshot of the folder you are trying to upload?

Thank you so much, it worked​:sob::sob::sob:
You are a life-safer

1 Like

great! glad it worked and you are welcome! :sunglasses:

I have a folder called ‘taniti’ and in that folder, I have 2 folders and then an index.html and a styles.css file. They are not in any folder. I am still getting the page not found and I am not sure why. Any help would be great.

Thanks
netlify_help

Hi there, glad you found us :wave: before we can help you, we need a little more information on the issues you are facing.

First, have you looked through this resource? It is a compilation of all of our build and deploy resources. This is a good starting point.

  • the name of your build instance: “example-jones.netlify.com
  • your most recent deploy log
  • what you have already tried
  • any error messages you have received in your terminal window or in the developer console

I just tried the fix of adding the _redirect file to the public directory. I believe the changes take a bit to reflect on the live site so I will go back tomorrow and check, but I wondered about this index.html placement. If the first fix doesn’t work then I will try this.

However, I wondered…I have a couple index.hml files, one in the root of my directory and one in the build. The one in the root is a basic index.html file. Wondered if having 2 files might be an issue? Or it’s normal.

Hi @rachelCodes20,

Thanks for reaching out and welcome to Netlify’s Support Forums.

Could you provide us with the link or the name of your site? Such as:

the name of your build instance: “example-jones.netlify.com

There should only be one index.html file in the root of your site. You can check by following this Support Guide:

Hi Melvin. Thanks for reaching out. The name of my site is https://raesrealm.tech/ the problem seems to only happens on refresh of a particular page. In that case, my index.html should be ok. There is only one in the root.

Hi @rachelCodes20,

Thanks for the follow-up. I’m not able to replicate the issue. Visiting https://raesrealm.tech/ I’m showing resolves properly and navigating to other pages on the site all seem to work. Were you able to resolve the issue?

If you are still having issues, could you provides steps on how to replicate the page not found?

I do see the site is made with create-react-app, and the usual solution is to add the following to the _redirect file:

/* /index.html 200

Could you try adding that if you’re still having issues?