Hello,
I’ve my Angular 17 application running well in Netlify. My navigation works like a charm, but I came across one problem.
When I click on the link in my navbar, i get redirected well.
When I enter the endpoint in my URL manually, I get a 404.
Why ? Is it a conf somewhere ?
Thanks a lot.
1 Like
I’m having the same issue using react router.
@lucasmelojs youhave to create a netlify.toml a the project root with redirects in order for the index.html to be found.
I never saw this post, but the self-solve answer given by @MartinZak is correct.
It’s referenced in the warning block on this page of the documentation:
https://docs.netlify.com/configure-builds/javascript-spas/#build-configuration-for-javascript-spas
With the details here:
https://docs.netlify.com/routing/redirects/rewrites-proxies/#history-pushstate-and-single-page-apps
It’s also mentioned in this support guide:
https://answers.netlify.com/t/support-guide-i-ve-deployed-my-site-but-i-still-see-page-not-found/125
In case there are still questions “why” it’s necessary, I gave a fairly detailed explanation here in the past: