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.
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:
… 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.
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.htmlexactly, (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?
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.
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 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.
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?