Hi Andrés,

This easy fix works on React projects by telling the browser to refer to ‘index.html’ for all manually entered URL’s.

By default, if I got to ‘www.yoursite.com/somepage’ the browser looks for a file (usually an index.html) in that sub route (‘/somepage’).

React is a Single Page Application, so there aren’t multiple pages (not an individual html file per page), React just rebuilds the view (sometimes using URLs with something like React Router).

So, this fix tells the browser to load the main index.html no matter what the manually entered URL is and then your React App can read the URL and build the correct view!

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store