# Keep getting 404 error for all routes aside the base url

**URL:** <https://answers.netlify.com/t/keep-getting-404-error-for-all-routes-aside-the-base-url/78907>\
**Category:** Support\
**Tags:** redirects\
**Created:** [November 9, 2022, 3:11am UTC](https://answers.netlify.com/t/keep-getting-404-error-for-all-routes-aside-the-base-url/78907 "2022-11-09T03:11:28Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![kassim](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/kassim/32/42846_2.png) [@kassim](https://answers.netlify.com/u/kassim)\
**Post date:** [November 9, 2022, 3:11am UTC](https://answers.netlify.com/t/keep-getting-404-error-for-all-routes-aside-the-base-url/78907/1 "2022-11-09T03:11:28Z")

</div>

Site Url: [https://unique-mandazi-f9e328.netlify.app/](https://unique-mandazi-f9e328.netlify.app/)

I have a react app that has some paths, When I try this [https://unique-mandazi-f9e328.netlify.app/sales](https://unique-mandazi-f9e328.netlify.app/sales) directly from the browser for example, it shows 404. but if i try the same within the app say via a button, it is able to navigate to the [https://unique-mandazi-f9e328.netlify.app/sales](https://unique-mandazi-f9e328.netlify.app/sales).

What have I tried: I have tried checking the Published Deploy and I can confirm that there is an index.html file. I am not sure what next steps to take.  
Thanks

---

<div class="post-metadata">

**Author:** ![clarnx](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/clarnx/32/40777_2.png) [@clarnx](https://answers.netlify.com/u/clarnx)\
**Post date:** [November 9, 2022, 9:57am UTC](https://answers.netlify.com/t/keep-getting-404-error-for-all-routes-aside-the-base-url/78907/2 "2022-11-09T09:57:47Z")

</div>

Hi @kassim, welcome. If possible can you share a repository of the site you are trying to deploy for me to help with the debugging.  
Thanks.

---

<div class="post-metadata">

**Author:** ![kassim](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/kassim/32/42846_2.png) [@kassim](https://answers.netlify.com/u/kassim)\
**Post date:** [November 9, 2022, 10:54am UTC](https://answers.netlify.com/t/keep-getting-404-error-for-all-routes-aside-the-base-url/78907/3 "2022-11-09T10:54:21Z")

</div>

Thanks for the reply, fijd the repo below. Since it’s private, u may need to be granted access to it.

[https://github.com/qaasimahmad/TheGrandRealtyUI](https://github.com/qaasimahmad/TheGrandRealtyUI)

---

<div class="post-metadata">

**Author:** ![clarnx](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/clarnx/32/40777_2.png) [@clarnx](https://answers.netlify.com/u/clarnx)\
**Post date:** [November 9, 2022, 1:08pm UTC](https://answers.netlify.com/t/keep-getting-404-error-for-all-routes-aside-the-base-url/78907/4 "2022-11-09T13:08:52Z")

</div>

Hi @kassim, since the repository is private I cannot view. You can create a minimal production repository of your site without any private information and then share.  
Thanks.

---

<div class="post-metadata">

**Author:** ![kassim](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/kassim/32/42846_2.png) [@kassim](https://answers.netlify.com/u/kassim)\
**Post date:** [November 10, 2022, 9:13am UTC](https://answers.netlify.com/t/keep-getting-404-error-for-all-routes-aside-the-base-url/78907/5 "2022-11-10T09:13:08Z")

</div>

Okay, I’ll work on this and share.

---

<div class="post-metadata">

**Author:** ![kassim](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/kassim/32/42846_2.png) [@kassim](https://answers.netlify.com/u/kassim)\
**Post date:** [November 10, 2022, 1:52pm UTC](https://answers.netlify.com/t/keep-getting-404-error-for-all-routes-aside-the-base-url/78907/6 "2022-11-10T13:52:16Z")

</div>

Hi there. I have a prod build. You can access it here

> **[GitHub - qaasimahmad/GarlandRealtyFE: Abridged version](https://github.com/qaasimahmad/GarlandRealtyFE)**
>
> Abridged version. Contribute to qaasimahmad/GarlandRealtyFE development by creating an account on GitHub.

> **[React App](https://amazing-froyo-d3b320.netlify.app/)**
>
> Web site created using create-react-app

---

<div class="post-metadata">

**Author:** ![clarnx](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/clarnx/32/40777_2.png) [@clarnx](https://answers.netlify.com/u/clarnx)\
**Post date:** [November 10, 2022, 2:12pm UTC](https://answers.netlify.com/t/keep-getting-404-error-for-all-routes-aside-the-base-url/78907/7 "2022-11-10T14:12:19Z")

</div>

Hi @kassim, thanks for sharing.

> [@kassim](#):
>
> but if i try the same within the app say via a button, it is able to navigate to the [https://unique-mandazi-f9e328.netlify.app/sales](https://unique-mandazi-f9e328.netlify.app/sales)

May I know the button on the site you are referring to?

---

<div class="post-metadata">

**Author:** ![kassim](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/kassim/32/42846_2.png) [@kassim](https://answers.netlify.com/u/kassim)\
**Post date:** [November 10, 2022, 2:17pm UTC](https://answers.netlify.com/t/keep-getting-404-error-for-all-routes-aside-the-base-url/78907/8 "2022-11-10T14:17:00Z")

</div>

![Screenshot 2022-11-10 at 15.14.09](https://global.discourse-cdn.com/netlify/original/3X/6/c/6c794439b92016a9763ff36b80246e091d8ecfe3.png)

CLick on the Arrow shown on the Homepage to move to the search page, then select either of the buttons shown in the screenshot.

Expected result BUY would change the url to [https://unique-mandazi-f9e328.netlify.app/sales](https://unique-mandazi-f9e328.netlify.app/sales). while RENT will change the url to [https://unique-mandazi-f9e328.netlify.app/rental](https://unique-mandazi-f9e328.netlify.app/rental)

---

<div class="post-metadata">

**Author:** ![kassim](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/kassim/32/42846_2.png) [@kassim](https://answers.netlify.com/u/kassim)\
**Post date:** [November 10, 2022, 2:19pm UTC](https://answers.netlify.com/t/keep-getting-404-error-for-all-routes-aside-the-base-url/78907/9 "2022-11-10T14:19:02Z")

</div>

Th issue is that if you go to the same directly without going via those buttons, the result is a 404 error.

There is also a path /verify-email, it also returns a 404 instead of redirecting to the HomePage. however on localhost, it works fine.

---

<div class="post-metadata">

**Author:** ![clarnx](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/clarnx/32/40777_2.png) [@clarnx](https://answers.netlify.com/u/clarnx)\
**Post date:** [November 10, 2022, 3:14pm UTC](https://answers.netlify.com/t/keep-getting-404-error-for-all-routes-aside-the-base-url/78907/10 "2022-11-10T15:14:59Z")

</div>

Hi @kassim, kindly create a `_redirects` file inside the `/public` folder like `/public/_redirects`.  
After paste the code below into the `_redirects` file.  
Your site should now work as expected when you explicitly visit the paths in the browser.

```auto
/* /index.html 200

```

Let me know the outcome.

Thanks.

---

<div class="post-metadata">

**Author:** ![kassim](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/kassim/32/42846_2.png) [@kassim](https://answers.netlify.com/u/kassim)\
**Post date:** [November 10, 2022, 4:11pm UTC](https://answers.netlify.com/t/keep-getting-404-error-for-all-routes-aside-the-base-url/78907/11 "2022-11-10T16:11:04Z")

</div>

Alright, i’ll try it out shortly and revert

---

<div class="post-metadata">

**Author:** ![kassim](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/kassim/32/42846_2.png) [@kassim](https://answers.netlify.com/u/kassim)\
**Post date:** [November 10, 2022, 4:39pm UTC](https://answers.netlify.com/t/keep-getting-404-error-for-all-routes-aside-the-base-url/78907/12 "2022-11-10T16:39:18Z")

</div>

It worked like Charm👌. Thanks

---

<div class="post-metadata">

**Author:** ![clarnx](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/clarnx/32/40777_2.png) [@clarnx](https://answers.netlify.com/u/clarnx)\
**Post date:** [November 10, 2022, 5:40pm UTC](https://answers.netlify.com/t/keep-getting-404-error-for-all-routes-aside-the-base-url/78907/13 "2022-11-10T17:40:19Z")

</div>

Hi @kassim, glad to know the suggestions helped to resolve your problem.  
Thanks.
