It gives 404 error when I refresh the page except the homepage

I deployed both the backend and frontend on render. There is no error shown in the logs. Everything works properly. But when I refresh the page it shows 404 not found error except the homepage.
url: https://zx-commerce.onrender.com/
GitHub: GitHub - kobrak1/e-commerce: e-commerce

1 Like

Hey,

Make sure you setup client-side routing: https://docs.render.com/docs/deploy-create-react-app#using-client-side-routing, this will allow the requests made to your service to be routed to your client-side router so the right components/modules are being shown as you change the URL.

Jérémy.
Render Support, UTC+3

Thanks, Jeremy, after configuring my static site with your suggestion I can see the status code is 200 but now it shows me a white blank page when I refresh the page.


and this image is before refresh

Hey,

I’ve been navigating your website right now and everything looks alright, I have tried page refresh and regular navigation.

Jérémy.
Render Support, UTC+3

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