Site name: [gleeful-biscochitos-280b52.netlify.app] or risingtidejournal.com
Hello, I’m really new to react and netlify and I’m having issues deploying my react app to my newly created domain with a 404 page not found error. I’ve come to understand that our “index.html” file must be at the root of my repository for the site to deploy properly, however the index.html file usually is created and placed in the “public” folder of react applications, and I’m not sure how to remove it from that folder without causing errors. Is there any way to direct the root to the index.html in the public folder?
Have you checked out the Netlify/Create React App documentation to confirm you have the correct build settings
Correct. And anything in
public is copied to the
If the above documentation doesn’t provide an answer, can you provide
- The build configuration as set in the Netlify UI
- Link to the public repository you are deploying from.
Hi @GabLikesCoffee, in addition to @coelmay’s answer, in case you are using React Router or any other client side routing package, kindly add a
_redirects file inside the
/public folder like
/public/_redirects . After add the contents below in the
_redirects file and then redeploy again to see if it works.
/* /index.html 200
The above is stated in the Deployment section at the second link @coelmay posted. However I am specifically stating it here again in case you missed it since the documentation states configuration for client-side routing which might escape or confuse most people reading the documentation.