Page Not Found Error After Successful Deployment

Hi Netlify Community,

I’m experiencing a “Page Not Found” error despite successfully deploying my site. Here’s a summary of the steps I’ve taken:

  1. Site URL: https://4gatoscoin.com
  2. Deployment Type: Manual deploys (No Git repository linked)
  3. Directory Structure:
public/
├── css/
│   └── styles.css
├── images/
│   └── ...
├── js/
│   ├── script.js
│   └── token.js
├── _redirects
├── about.html
├── contact.html
├── index.html
├── objectives.html
├── records.html
├── token.html
└── whitepaper.html
  1. Files:
  • _redirects file content:
/*    /index.html   200
  • netlify.toml file content:

toml

[build]
  publish = "public"
  command = "npm run build"

[[redirects]]
  from = "/*"
  to = "/index.html"
  status = 200
  1. Issue:
  • Despite the successful deployment, I continue to receive a “Page Not Found” error when accessing https://4gatoscoin.com.

Could anyone provide insights or solutions to resolve this issue?

Thank you in advance for your help!

@Enrique_Sousa You need to change your Build settings.

Specifically I believe that you haven’t set your Publish directory correctly.

Your files are in public.
If you want them served at the root /, you need to set your Publish directory to public.

Without that, they’re being deployed where they are, so they end up as /public/index.html

Which you can see here:
https://4gatoscoin.com/public/index.html

1 Like

Hi nathanmartin,

Thank you for your assistance. I followed your instructions and configured my netlify.toml file as follows:

toml

[build]
  publish = "public"
  command = "npm run build"

[[redirects]]
  from = "/*"
  to = "/index.html"
  status = 200

I have also moved the netlify.toml file to the root of my repository. However, I am still encountering the “Page Not Found” error.

My current folder structure is:

4gatoscoinweb3/
├── public/
│   ├── index.html
│   ├── _redirects
├── netlify.toml
├── other-files-and-folders

I have also verified that the _redirects file inside the public folder contains the following:

plaintext

/* /index.html 200

I would appreciate any further assistance to resolve this issue. Thanks in advance!

Then you’re still doing something wrong.

Unfortunately from only the info you’ve provided it’s hard for me guess at what that is.

If your repository is public you should provide a link to it.

You can also use the Deploy File Browser to check what files you have deployed.

This is still visible though, so it looks like you’ve changed nothing so far:
https://4gatoscoin.com/public/index.html

1 Like

Title: Successfully Deployed 4GatosCoinWeb3 on Netlify with Custom Domain

I wanted to share my experience and the steps I followed to successfully deploy my project, 4GatosCoinWeb3, on Netlify and link it to my custom domain, 4gatoscoin.com.

  1. Installation and Configuration:
  • Installed the Netlify CLI in the root directory of my project.
  • Logged in to Netlify using the CLI: netlify login.
  1. Setting Up the Site on Netlify:
  • Created a new site on Netlify using: netlify sites:create.
  • Chose the team and provided a unique site name: 4gatoscoinweb3.
  1. GitHub Issues and Alternative Deployment:
  • Initially faced issues while pushing files to GitHub due to branch conflicts and authorization problems.
  • Decided to remove GitHub configuration:

bash

git remote remove origin
rm -rf .git
  1. Manual Deployment via Netlify:
  • Configured the netlify.toml file with the following settings:

plaintext

[build]
  publish = "public"
  command = "npm run build"

[[redirects]]
  from = "/*"
  to = "/index.html"
  status = 200
  • Deployed the site manually using: netlify deploy --prod.
  1. Configuring the Custom Domain:
  • Initially faced issues with the custom domain being used by another site.
  • Removed the custom domain from the previous site and assigned it to the new site.
  • Set 4gatoscoin.com as the primary domain and www.4gatoscoin.com to redirect automatically.
  1. Final Verification:
  • Verified that both 4gatoscoin.com and www.4gatoscoin.com were correctly pointing to the Netlify site.

Now, my site is live and accessible via my custom domain. If you’re experiencing similar issues, I hope these steps help!

1 Like