Page Not Found for my website

Hello, i deploy my site from github and i code on glitch.com. On glitch i can see my website perfectly and when i export to github which then updates netlify since its connected to my github. Netlify doesnt seem to work and says “Page not found”
Glitch Website : https://smojofoundationn.glitch.me/home.html
Github : GitHub - smojoyt/123
Netlify : https://smojofoundationn.netlify.com/

Your netlify deploy is working perfectly
try: https://smojofoundationn.netlify.com/views/home.html

To view your site without adding /views/home.html
Rename your home.html file to index.html

and from netlify admin panel set views as publish directory

  1. Open https://app.netlify.com/
  2. Select your site
  3. Click on site settings button
  4. Select Build & deploy tab (located under General tab)
  5. In Continuous Deployment > Build Settings card, click Edit Settings
  6. Type views in Publish directory input box
2 Likes

Thank you this worked :). Is there anyway to get rid of the .html at the end as well?

which .html at end?
I see https://smojofoundationn.netlify.com/ opens without any error now
and there’s no .html at this URLs end

For example right here https://smojofoundationn.netlify.com/events.html it has .html at the end. Although if you manually remove it. https://smojofoundationn.netlify.com/events it seem to work as well. But by default it has .html. The home page on the other hand seems fine.

Hi @smojoyt! Try enabling our “pretty urls” feature here: Netlify App

Let us know if that is the solution you were looking for.

2 Likes

you are amazing <3. Thank you so much

1 Like

i did the same but i am not yet finding a solution. i am still getting the error.
site : gracious-rosalind-8e0ad5.netlify.com

Your site is missing an index, like mentioned here: "Looks like you've followed a broken link" when viewing site - #16 by tomrutgers

1 Like

I have a site https://rawcipher.netlify.app and it loads the home page fine and all else is good on desktop, but when I test it on my phone I get the home page but only the home page. All other pages I get a 404. Any help is appreciated.

I found a solution. I added the following after the “build” script within package.json"react-scripts build && echo '/* /index.html 200' | cat >build/_redirects " . This insured that future builds did not receive a .txt format _redirects file.

1 Like