Support Forums


The better the post - the faster the answer.

Name: Ben
Site Name: hookahhouse
URL: https://hookahhouse.netlify.app

Issue: When navigating to different routes and then refreshing the page on those routes the site redirects to a page not found.

Was looking at answers to this and found to create a _redirects.toml with the following:
/* /index.html 200 . Put it in the public folder. No change. I made sure also to re run the deploy .

Any other pointers would be greatly appreciated.

Actually, it’s either a _redirects file in your built sites’ root folder or a netlify.toml file in your repository’s root.

Check out both links on the top of this doc page:

1 Like

Thanks for the quick reply. Yes I also read where ether is the solution. I did both. I made sure _redirects file was at the root of my build site folder and also in my repositories root. Below are screen shots showing that.

Screen Shot 2021-09-22 at 4.22.08 PM

Thanks for the suggestion of moving it out of the public folder. It still goes to the page not found when refreshed.

Hi @bholsinger09

As @tomrutgers mentioned, it is a _redirects file, not a _redirects.toml file.

A netlify.toml file is different to a _redirects file see File-based Configuration | Redirects vs the redirects documentation shared previously.


@tomrutgers and @coelmay thank you both for your answers. Yes you are both right. I probably should have done some more reading about the _redirect files format as a text. I just updated the package.json file for where the build script was with creating a _redirect with status 200. I found the solution here : reactjs - Catch all redirect for create-react-app in netlify - Stack Overflow. Thanks for pointing me in the right direction.

1 Like