Build successful, but still get page not found error
Read the support file. Add _redirects file and still got this error:

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.

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

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


solves the problem.
After the page refresh, I still got 404, but this is not a problem. Open the link again)))

Hi @ArtursBuls, thanks for the feedback.

I visited your site and it looks like redirects to
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.

/*    /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.


Sure. I made the repo visible.
Would be nice if you can able to look into my code…:slight_smile:

trešd., 2023. g. 13. sept., plkst. 13:44 — lietotājs Clarence A. via Netlify Support Forums (<>) rakstīja:


export const HttpLoaderFactory = (http: HttpClient): TranslateHttpLoader => new TranslateHttpLoader(http);
export const appConfig: ApplicationConfig = {
providers: [
provideRouter(APP_ROUTES, withInMemoryScrolling({ scrollPositionRestoration: ‘enabled’ }), withHashLocation()),
defaultLanguage: ‘lv-LV’,
loader: {
provide: TranslateLoader,
useFactory: HttpLoaderFactory,
deps: [HttpClient],

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 (<>) rakstīja:

Hi @ArtursBuls, thanks for the extra feedback.

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

"assets": [

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


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 (<>) rakstīja:

1 Like

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