Page Not Found. index.html works fine locally but not on Netlify

I have started using Netlify in the last few months, couple of sites I set-up work wonderfully. One I set-up today is not working and no errors are generated in the deploy logs. the site is https://gcms-consent-form.netlify.app/ It’s a simple site with a one page form which uses obfuscated html code, the form is not used to collect any submission so I am not using the Netlify form tags. Could obfuscating code be an issue. I see no errors generated in the deploy logs. Thanks all for your help.

Hi there,

Did you see this guide yet? This is the best place to start for β€œPage Not Found” issues.

If you are still seeing issues after following the troubleshooting steps in this guide, please let us know!

Oh, and i also edited your username to something that doesn’t contain the word support just so there aren’t any misconceptions :wink:

1 Like

Thanks perry, first for your super prompt response, awesome :smiley:
The screenshot was helpful and I was able to download the file, didn’t realize that functionality was out there
I see now what the issue was; I was using index.shtml I renamed the file to .html and I am online :sunglasses:

Thanks for changing the username, :baby: newbie at this and the name came through automatically from email address

I am so impressed by both the Netlify service and support! Thanks all for your help.

1 Like

Hi Perry,

I have done the steps above and my deploy folder does contain an index.html file.

I have tried deploying it from my Github Master Branch:
Github: GitHub - TravisFriday/twitter
Website: https://tftwitter.netlify.app/

I have also tried deploying it manually.
https://manualtwitter.netlify.app/

I am not sure how to go ahead.

Hey @TravisFriday, it looks like for tftwitter.netlify.app, your publish directory is set to build/ here:

But in your repo, the index.html is in public/. Do you want to try setting your publish directory to public/ and see if that fixes things for you?

You can read more about build settings here:

Let us know how it goes and if you have any other questions!

i try all but for me still not working.
on Next.js

Also for me nothing work.

Hi @mostafa_elbanna and @jemi :wave:t6: ! Welcome to the forums. Please can you both share your site and your deploy log so we can assist further?

9:15:14 PM: build-image version: 4c0c1cadee6a31c9bb8d824514030009c4c05c6a (focal)
9:15:14 PM: build-image tag: v4.15.0
9:15:14 PM: buildbot version: ac15ba4f0bb5d2efb67ad5426b99839d2b59b25b
9:15:14 PM: Fetching cached dependencies
9:15:14 PM: Starting to download cache of 832.9MB
9:15:22 PM: Finished downloading cache in 8.091579474s
9:15:22 PM: Starting to extract cache
9:15:27 PM: Finished extracting cache in 4.208930555s
9:15:27 PM: Finished fetching cache in 12.451564426s
9:15:27 PM: Starting to prepare the repo for build
9:15:27 PM: Preparing Git Reference refs/heads/master
9:16:14 PM: Parsing package.json dependencies
9:16:15 PM: Section completed: initializing
9:16:15 PM: Starting build script
9:16:15 PM: Installing dependencies
9:16:15 PM: Python version set to 2.7
9:16:15 PM: Started restoring cached node version
9:16:16 PM: Finished restoring cached node version
9:16:16 PM: v16.18.1 is already installed.
9:16:16 PM: Now using node v16.18.1 (npm v8.19.2)
9:16:16 PM: Enabling node corepack
9:16:17 PM: Started restoring cached build plugins
9:16:17 PM: Finished restoring cached build plugins
9:16:17 PM: Attempting ruby version 2.7.2, read from environment
9:16:17 PM: Using ruby version 2.7.2
9:16:17 PM: Using PHP version 8.0
9:16:18 PM: No npm workspaces detected
9:16:18 PM: Started restoring cached node modules
9:16:18 PM: Finished restoring cached node modules
9:16:18 PM: Started restoring cached go cache
9:16:18 PM: Finished restoring cached go cache
9:16:18 PM: Installing Go version 1.17 (requested 1.17)
9:16:22 PM: unset GOOS;
9:16:22 PM: unset GOARCH;
9:16:22 PM: export GOROOT=β€˜/opt/buildhome/.gimme/versions/go1.17.linux.amd64’;
9:16:22 PM: export PATH=β€œ/opt/buildhome/.gimme/versions/go1.17.linux.amd64/bin:${PATH}”;
9:16:22 PM: go version >&2;
9:16:22 PM: export GIMME_ENV=β€œ/opt/buildhome/.gimme/env/go1.17.linux.amd64.env”
9:16:22 PM: go version go1.17 linux/amd64
9:16:23 PM: Detected 1 framework(s)
9:16:23 PM: β€œnext” at version β€œ13.0.2”
9:16:23 PM: Installing missing commands
9:16:23 PM: Verify run directory
9:16:24 PM: ​
9:16:24 PM: ────────────────────────────────────────────────────────────────
9:16:24 PM: Netlify Build
9:16:24 PM: ────────────────────────────────────────────────────────────────
9:16:24 PM: ​
9:16:24 PM: ❯ Version
9:16:24 PM: @netlify/build 28.3.1
9:16:24 PM: ​
9:16:24 PM: ❯ Flags
9:16:24 PM: baseRelDir: true
9:16:24 PM: buildId: 637d1fa985eca100089fc096
9:16:24 PM: deployId: 637d1fa985eca100089fc098
9:16:24 PM: ​
9:16:24 PM: ❯ Current directory
9:16:24 PM: /opt/build/repo
9:16:24 PM: ​
9:16:24 PM: ❯ Config file
9:16:24 PM: No config file was defined: using default values.
9:16:24 PM: ​
9:16:24 PM: ❯ Context
9:16:24 PM: production
9:16:24 PM: ​
9:16:24 PM: ❯ Using Next.js Runtime - v4.29.0
9:16:24 PM: ​
9:16:24 PM: ❯ Outdated plugins
9:16:24 PM: - @netlify/plugin-nextjs@4.29.0: latest version is 4.29.2
9:16:24 PM: To upgrade this plugin, please update its version in β€œpackage.json”
9:16:26 PM: ​
9:16:26 PM: ────────────────────────────────────────────────────────────────
9:16:26 PM: 1. @netlify/plugin-nextjs (onPreBuild event)
9:16:26 PM: ────────────────────────────────────────────────────────────────
9:16:26 PM: ​
9:16:26 PM: Next.js cache restored.
9:16:26 PM: Not running Next Runtime
9:16:26 PM: ​
9:16:26 PM: (@netlify/plugin-nextjs onPreBuild completed in 342ms)
9:16:26 PM: ​
9:16:26 PM: ────────────────────────────────────────────────────────────────
9:16:26 PM: 2. Build command from Netlify app
9:16:26 PM: ────────────────────────────────────────────────────────────────
9:16:26 PM: ​
9:16:26 PM: $ next build
9:16:26 PM: info - Linting and checking validity of types…
9:16:29 PM: info - Creating an optimized production build…
9:16:30 PM: info - Compiled successfully
9:16:30 PM: info - Collecting page data…
9:16:31 PM: info - Generating static pages (0/4)
9:16:31 PM: info - Generating static pages (1/4)
9:16:31 PM: info - Generating static pages (2/4)
9:16:31 PM: info - Generating static pages (3/4)
9:16:31 PM: info - Generating static pages (4/4)
9:16:31 PM: info - Finalizing page optimization…
9:16:31 PM: Route (pages) Size First Load JS
9:16:31 PM: β”Œ β—‹ / 258 B 72.9 kB
9:16:31 PM: β”œ /_app 0 B 72.7 kB
9:16:31 PM: β”œ β—‹ /404 181 B 72.9 kB
9:16:31 PM: β”œ Ξ» /api/hello 0 B 72.7 kB
9:16:31 PM: β”” β—‹ /inner 262 B 72.9 kB
9:16:31 PM: + First Load JS shared by all 72.7 kB
9:16:31 PM: β”œ chunks/framework-f62daa56174d3a31.js 45.4 kB
9:16:31 PM: β”œ chunks/main-a455256c0236c590.js 26.3 kB
9:16:31 PM: β”œ chunks/pages/_app-4b2041e059ed5a29.js 286 B
9:16:31 PM: β”” chunks/webpack-4e7214a60fad8e88.js 712 B
9:16:31 PM: Ξ» (Server) server-side renders at runtime (uses getInitialProps or getServerSideProps)
9:16:31 PM: β—‹ (Static) automatically rendered as static HTML (uses no initial props)
9:16:31 PM: ​
9:16:31 PM: (build.command completed in 5.4s)
9:16:31 PM: ​
9:16:31 PM: ────────────────────────────────────────────────────────────────
9:16:31 PM: 3. @netlify/plugin-nextjs (onBuild event)
9:16:31 PM: ────────────────────────────────────────────────────────────────
9:16:31 PM: ​
9:16:31 PM: ​
9:16:31 PM: (@netlify/plugin-nextjs onBuild completed in 4ms)
9:16:31 PM: ​
9:16:31 PM: ────────────────────────────────────────────────────────────────
9:16:31 PM: 4. @netlify/plugin-nextjs (onPostBuild event)
9:16:31 PM: ────────────────────────────────────────────────────────────────
9:16:31 PM: ​
9:16:32 PM: Next.js cache saved.
9:16:32 PM: ​
9:16:32 PM: Creating deploy upload records
9:16:32 PM: (@netlify/plugin-nextjs onPostBuild completed in 281ms)
9:16:32 PM: ​
9:16:32 PM: ────────────────────────────────────────────────────────────────
9:16:32 PM: 5. Deploy site
9:16:32 PM: ────────────────────────────────────────────────────────────────
9:16:32 PM: ​
9:16:32 PM: Starting to deploy site from β€˜.next’
9:16:32 PM: Creating deploy tree
9:16:33 PM: 12 new files to upload
9:16:33 PM: 0 new functions to upload
9:16:33 PM: Section completed: deploying
9:16:33 PM: Site deploy was successfully initiated
9:16:33 PM: ​
9:16:33 PM: (Deploy site completed in 1.2s)
9:16:33 PM: ​
9:16:33 PM: ────────────────────────────────────────────────────────────────
9:16:33 PM: Starting post processing
9:16:33 PM: Netlify Build Complete
9:16:33 PM: ────────────────────────────────────────────────────────────────
9:16:33 PM: ​
9:16:33 PM: Post processing - HTML
9:16:33 PM: (Netlify Build completed in 8.9s)
9:16:33 PM: Caching artifacts
9:16:33 PM: Started saving node modules
9:16:33 PM: Finished saving node modules
9:16:33 PM: Started saving build plugins
9:16:33 PM: Finished saving build plugins
9:16:33 PM: Started saving pip cache
9:16:34 PM: Post processing - header rules
9:16:33 PM: Finished saving pip cache
9:16:33 PM: Started saving emacs cask dependencies
9:16:33 PM: Finished saving emacs cask dependencies
9:16:34 PM: Post processing - redirect rules
9:16:33 PM: Started saving maven dependencies
9:16:33 PM: Finished saving maven dependencies
9:16:33 PM: Started saving boot dependencies
9:16:34 PM: Post processing done
9:16:33 PM: Finished saving boot dependencies
9:16:33 PM: Started saving rust rustup cache
9:16:33 PM: Finished saving rust rustup cache
9:16:34 PM: Section completed: postprocessing
9:16:33 PM: Started saving go dependencies
9:16:33 PM: Finished saving go dependencies
9:16:33 PM: Build script success
9:16:33 PM: Section completed: building
9:16:36 PM: Site is live :sparkles:
9:16:38 PM: Uploading Cache of size 835.2MB
9:16:44 PM: Section completed: cleanup
9:16:44 PM: Finished processing build request in 1m29.95754575s

https://637d1fa985eca100089fc098--curious-alpaca-268ef5.netlify.app/

NOTE: Now i deleted most of pages and components to figure out if the problem was in code

Hey there, @mostafa_elbanna :wave:

Looking at your most recent deploy log, it looks like you are no longer using outdated plugins which is great.

Do you have an index.html / index.js file in your repository? Can you share your repository with us so we can see the files you have?

sure
https://bitbucket.org/mostafa_shaban_elbanna/test-netlify/src/master/

I just tried your repo: https://github.com/Hrishikesh-K/test-netlify and it seems to work fine, without any issues.

I recall there was a problem with Bitbucket repos which is now fixed. Could you try to create a new site from the UI, or try using GitHub or GitLab.

The site: Netlify App