# Build successful, but still get page not found error

**URL:** <https://answers.netlify.com/t/build-successful-but-still-get-page-not-found-error/101739>\
**Category:** Support\
**Tags:** angular\
**Created:** [September 12, 2023, 6:53pm UTC](https://answers.netlify.com/t/build-successful-but-still-get-page-not-found-error/101739 "2023-09-12T18:53:47Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![ArtursBuls](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/artursbuls/32/54475_2.png) [@ArtursBuls](https://answers.netlify.com/u/ArtursBuls)\
**Post date:** [September 12, 2023, 6:53pm UTC](https://answers.netlify.com/t/build-successful-but-still-get-page-not-found-error/101739/1 "2023-09-12T18:53:47Z")

</div>

[https://siluets.netlify.app](https://siluets.netlify.app)  
Read the support file. Add \_redirects file and still got this error:  
 ![image](https://global.discourse-cdn.com/netlify/original/3X/0/5/0569ee893ebf039c0f15060aff2f66ed0aaa0d11.png)

---

<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:** [September 12, 2023, 9:43pm UTC](https://answers.netlify.com/t/build-successful-but-still-get-page-not-found-error/101739/2 "2023-09-12T21:43:15Z")

</div>

Hi @ArtursBuls, thanks for the post and welcome to the Netlify Support Forums.

Kindly checkout the support guide below for possible reasons for the Not found page.

> [@\[Support Guide\] I’ve deployed my site but I still see "Page not found”](https://answers.netlify.com/t/support-guide-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…

Also since you tagged the post as angular, checkout the links below for how to resolve similar problems.

> [@Page Not Found after deploying angular application](https://answers.netlify.com/t/page-not-found-after-deploying-angular-application/73881):
>
> we need to know your netlify site name : [https://i-need-a-beer.netlify.app](https://i-need-a-beer.netlify.app) I keep getting the following after uploading my site: Looks like you’ve followed a broken link or entered a URL that doesn’t exist on this site. \*The deploy says that it’s all fine. This is my repo: [GitHub - mghmay/i-need-a-beer: For when you really need that beer.](https://github.com/mghmay/i-need-a-beer)

> [@Angular deploy still see Page not found](https://answers.netlify.com/t/angular-deploy-still-see-page-not-found/18636):
>
> I have used Netlify for a while now and I still do not understand why sometimes the Angular projects that I am deploying are working and sometimes they are not. I am pretty sure there is something I am doing in some configuration that sometimes I am integrating and sometimes not. By the way, in each one of the listed websites below, has the build command set to ‘ng build --prod’ and the ‘dist’ folder set, and this is why I am getting crazy to find the issue (I am not gonna attach each one of t…

If the above does not help, kindly share the contents of your `_redirects` file and also a snippet of your build logs.

Thanks.

---

<div class="post-metadata">

**Author:** ![ArtursBuls](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/artursbuls/32/54475_2.png) [@ArtursBuls](https://answers.netlify.com/u/ArtursBuls)\
**Post date:** [September 13, 2023, 4:47am UTC](https://answers.netlify.com/t/build-successful-but-still-get-page-not-found-error/101739/3 "2023-09-13T04:47:43Z")

</div>

Thanks.  
**dist/siluets**  
solves the problem.  
After the page refresh, I still got 404, but this is not a problem. Open the link again)))  
 ![build_settings](https://global.discourse-cdn.com/netlify/original/3X/b/3/b3a18a4ef7166c8d17a2fea2304cba45278a7a74.png)

---

<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:** [September 13, 2023, 10:34am UTC](https://answers.netlify.com/t/build-successful-but-still-get-page-not-found-error/101739/4 "2023-09-13T10:34:19Z")

</div>

Hi @ArtursBuls, thanks for the feedback.

> [@ArtursBuls](#):
>
> After the page refresh, I still got 404, but this is not a problem. Open the link again)))

I visited your site and it looks like `https://siluets.netlify.app` redirects to `https://siluets.netlify.app/home`  
The not found error happens because after a refresh the `home` route does not exist.  
You need to also have a `home` component that renders when the path is `home` and then use your router package to handle path to `home`

Also if the content in your `_redirects` does not match the code below, kindly change it to the code below and then try again to see if it works.

```auto
/* /index.html 200

```

However if the content in your `_redirects` file is the same as the code above, if possible kindly share a repository or a minimal version of your site for me to help with the debugging.

Thanks.

---

<div class="post-metadata">

**Author:** ![ArtursBuls](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/artursbuls/32/54475_2.png) [@ArtursBuls](https://answers.netlify.com/u/ArtursBuls)\
**Post date:** [September 13, 2023, 11:36am UTC](https://answers.netlify.com/t/build-successful-but-still-get-page-not-found-error/101739/5 "2023-09-13T11:36:54Z")

</div>

Sure. I made the repo visible. [https://github.com/ArtursBuls/siluets](https://github.com/ArtursBuls/siluets)  
Would be nice if you can able to look into my code…🙂  
Thanks.

trešd., 2023. g. 13. sept., plkst. 13:44 — lietotājs Clarence A. via Netlify Support Forums (\<[notifications@netlify.discoursemail.com](mailto:notifications@netlify.discoursemail.com)\>) rakstīja:

---

<div class="post-metadata">

**Author:** ![ArtursBuls](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/artursbuls/32/54475_2.png) [@ArtursBuls](https://answers.netlify.com/u/ArtursBuls)\
**Post date:** [September 13, 2023, 2:07pm UTC](https://answers.netlify.com/t/build-successful-but-still-get-page-not-found-error/101739/6 "2023-09-13T14:07:10Z")

</div>

Hi  
[https://siluets.netlify.app/#/contacts](https://siluets.netlify.app/#/contacts)

> export const HttpLoaderFactory = (http: HttpClient): TranslateHttpLoader =\> new TranslateHttpLoader(http);  
> export const appConfig: ApplicationConfig = {  
> providers: [  
> provideRouter(APP\_ROUTES, withInMemoryScrolling({ scrollPositionRestoration: ‘enabled’ }), **withHashLocation()**),  
> importProvidersFrom(  
> TranslateModule.forRoot({  
> defaultLanguage: ‘lv-LV’,  
> loader: {  
> provide: TranslateLoader,  
> useFactory: HttpLoaderFactory,  
> deps: [HttpClient],  
> },  
> })  
> ),  
> provideAnimations(),  
> provideHttpClient(),  
> ],  
> };

seems the problem is solved, but I’m not sure that is the correct way…

trešd., 2023. g. 13. sept., plkst. 14:36 — lietotājs Artūrs Buls (\<[arturs.buls@gmail.com](mailto:arturs.buls@gmail.com)\>) rakstīja:

---

<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:** [September 13, 2023, 2:13pm UTC](https://answers.netlify.com/t/build-successful-but-still-get-page-not-found-error/101739/7 "2023-09-13T14:13:29Z")

</div>

Hi @ArtursBuls, thanks for the extra feedback.

> [@ArtursBuls](#):
>
> seems the problem is solved, but I’m not sure that is the correct way…

A better solution is that you have to add the `scr/_redirects` to the `assets` array in your `angular.json` file  
Your assets section in your `angular.json` should look like the below

```auto
... 
"assets": [
   "src/favicon.ico",
   "src/assets",
   "src/_redirects"
],
...

```

Try the above and then redeploy. It should work as expected.

Thanks.

---

<div class="post-metadata">

**Author:** ![ArtursBuls](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/artursbuls/32/54475_2.png) [@ArtursBuls](https://answers.netlify.com/u/ArtursBuls)\
**Post date:** [September 13, 2023, 4:32pm UTC](https://answers.netlify.com/t/build-successful-but-still-get-page-not-found-error/101739/8 "2023-09-13T16:32:00Z")

</div>

Thanks, man. I almost broke my mind by solving this))).  
Good luck.

trešd., 2023. g. 13. sept., plkst. 17:23 — lietotājs Clarence A. via Netlify Support Forums (\<[notifications@netlify.discoursemail.com](mailto:notifications@netlify.discoursemail.com)\>) rakstīja:

---

<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:** [September 13, 2023, 6:04pm UTC](https://answers.netlify.com/t/build-successful-but-still-get-page-not-found-error/101739/9 "2023-09-13T18:04:13Z")

</div>

Hi @ArtursBuls, thanks for sharing.  
Glad to know the suggestion helped.
