# 404 after successful deployment

**URL:** <https://answers.netlify.com/t/404-after-successful-deployment/19913>\
**Category:** Support\
**Tags:** netlify-newbie, building, deployment\
**Created:** [July 31, 2020, 3:37pm UTC](https://answers.netlify.com/t/404-after-successful-deployment/19913 "2020-07-31T15:37:06Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![wondasom](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/wondasom/32/10379_2.png) [@wondasom](https://answers.netlify.com/u/wondasom)\
**Post date:** [July 31, 2020, 3:37pm UTC](https://answers.netlify.com/t/404-after-successful-deployment/19913/1 "2020-07-31T15:37:06Z")

</div>

- My site name is `https://reditofind.netlify.app`
- I wanted to publish ‘restaurant-finder’ directory that is in ‘redi-FinalProject’
- In Build Settings, I changed my publish directory to ‘restaurant-finder’ → failed
- In Build Settings, I changed my base directory to ‘restaurant-finder’ → deploy success with 404 error
- Currently, in my package.json, scripts.build = “CI= react-scripts build”

Here is my [published deploy log](https://app.netlify.com/sites/reditofind/deploys/5f2438b54febd6dcab5a9687)

Looking for a tip or a solution from the community!  
Thank you in advance 🙂

---

<div class="post-metadata">

**Author:** ![perry](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/perry/32/16_2.png) [@perry](https://answers.netlify.com/u/perry)\
**Post date:** [July 31, 2020, 4:40pm UTC](https://answers.netlify.com/t/404-after-successful-deployment/19913/2 "2020-07-31T16:40:32Z")

</div>

Hi there,

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

> [@\[Support Guide\] I’ve deployed my site but I still see "Page not found”](https://answers.netlify.com/t/common-issue-i-ve-deployed-my-site-but-i-still-see-page-not-found/125):
>
> Last reviewed by Netlify Support - August, 2023 Netlify attempts to lookup a file based on several xor filters, and when all of these fail, we end up serving a 404 page. For example, a request made to /example/ would check /example/index.html, /example.html, /example/home.html and several other combinations (not necessarily in the same order) before hitting the 404. However, in case you were not expecting a 404 at a particular URL, you might be interested in finding out the reason and potentia…

[This Support Guide](https://answers.netlify.com/t/common-issue-frequently-encountered-problems-during-builds/213) contains a ton of useful debugging tips that can likely help you solve your problem 🙂

We also recommend trying to search the forums with the build error you encountered - it’s likely your question was already asked by someone else!

If you are still having problems, please provide as much information as you can on what you have already tried, what your build settings are, your `package.json`, etc. Thanks!

---

<div class="post-metadata">

**Author:** ![Scott](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/scott/32/26136_2.png) [@Scott](https://answers.netlify.com/u/Scott)\
**Post date:** [August 2, 2020, 10:07pm UTC](https://answers.netlify.com/t/404-after-successful-deployment/19913/4 "2020-08-02T22:07:32Z")

</div>

Hey @wondasom,

Did the above advice help?

---

<div class="post-metadata">

**Author:** ![wondasom](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/wondasom/32/10379_2.png) [@wondasom](https://answers.netlify.com/u/wondasom)\
**Post date:** [August 3, 2020, 12:04pm UTC](https://answers.netlify.com/t/404-after-successful-deployment/19913/5 "2020-08-03T12:04:02Z")

</div>

Hi there,

1. I downloaded the copy of the deploy and it seemed alright to me.  
All the files I worked on were there.

As I mentioned earlier,  
2. When I change my Publish directory, deploy fails  
3. When I change my Base directory, deploy succeeds with 404 errors

Below is my package.json

```
{
  "name": "restaurant-finder",
  "version": "0.1.0",
  "private": true,
  "dependencies": {
"@testing-library/jest-dom": "^4.2.4",
"@testing-library/react": "^9.5.0",
"@testing-library/user-event": "^7.2.1",
"react": "^16.13.1",
"react-dom": "^16.13.1",
"react-dropdown": "^1.7.0",
"react-onclickoutside": "^6.9.0",
"react-router": "^5.2.0",
"react-router-dom": "^5.2.0",
"react-scripts": "3.4.1",
"react-select": "^3.1.0",
"styled-components": "^5.1.1"
  },
  "scripts": {
"start": "react-scripts start",
"build": "CI= react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
  },
  "eslintConfig": {
"extends": "react-app"
  },
  "browserslist": {
"production": [
  ">0.2%",
  "not dead",
  "not op_mini all"
],
"development": [
  "last 1 chrome version",
  "last 1 firefox version",
  "last 1 safari version"
]
  }
}

```

Thanks!

---

<div class="post-metadata">

**Author:** ![Scott](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/scott/32/26136_2.png) [@Scott](https://answers.netlify.com/u/Scott)\
**Post date:** [August 3, 2020, 12:53pm UTC](https://answers.netlify.com/t/404-after-successful-deployment/19913/6 "2020-08-03T12:53:25Z")

</div>

Hey @wondasom,

[The definitions](https://docs.netlify.com/configure-builds/get-started/#definitions) for each of these directories can be found in the aforementioned link. Your base directory may be `/` (if your package.json is in `/`, for example) and your base directory will be where your `index.html` is.
