Unable to access routes, other than index

I’ve created a static site using the Ember framework, which builds a static HTML single page app (so navigation is virtual within the same index.html page). I can hit the index route (main dashboard), but every time I try to go to a sub route I get a 404. I have an index.html and I’ve correctly identified the build directory. Is there something else I have to configure? Thanks!

Hello Mark and welcome to the Kinsta Community!

Can you please try specifying the index.html file as the “Error file” in the Settings page for the static site in MyKinsta? This should route errors back to this file and I think this is likely to resolve the issue.

Let us know how it goes!

Hi @Nat_R , thanks for the reply. I changed the Error file to index.html and then redeployed, but unfortunately I still get the 404 page whenever I try to access any other route than the index.

Hi @CodeLoki

For further investigation, could you send me the domain name or the MyKinsta link for your Static site via direct message?

Thanks!

Thanks for the reply @Adrian_L. I just figured out my issue. This is a single page ember application, which uses the ember router to navigate. However, I was using regular anchor tags for links, which don’t use the router, so the server responded with a 404. I’ve changed my site to use the ember router for navigation and it works great. It will still fail if I hit refresh on a sub route, but I can live with that.

Sorry to bother you for this PEBKAC issue.

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.