Pastebin site made with react gives page not found error

hello first of all. I need some help.

firstly ı made a bin site but when i save text and i open random generated links i got 404 error.
I saw in the help forum that this is a problem with React, but I couldn’t find a suitable solution for me.

site link:
github link: GitHub - EmojiPati/PatiBin: Your Best Way to Save Your Codes or Texts.

@emojipati This answer also applies to you:

@emojipati I can see you’ve added a _redirects file, but your problem is your _redirects file is in the root of your repository, it needs to be in the root of whatever you have set as your Publish directory


ı got this deploy log.

A “_redirects” file is present in the repository but is missing in the publish directory “build”.

ım newbie in react how can ı add _redirects file in my render folder.
render folder is “build”.

@emojipati How you get the file into the Publish directory is ultimately up to you or the system you’re working with.

In your case, you likely want to leverage the public folder.

Looking at the docs for ‘Create React App’…

If you put a file into the public folder, it will not be processed by webpack. Instead it will be copied into the build folder untouched.

Just drop your _redirects file into /public, so it is /public/_redirects

1 Like

I’m trying right now, please give me a minute.

There’s no rush, I’m just trying to give you some speedy help :slightly_smiling_face:

You can remove the _redirects file from the root of the repo too, once you have the one in /public

Doing so will just prevent any confusion in future, where you may open your project and edit that file and then wonder why it doesn’t take effect.

It Work Thank you for helping me.
Best Moderator “nathanmartin” <3

Great work!

I’m not a moderator, and I don’t work for Netlify.
I’m just a developer and have used Netlify since before it was Netlify.

I just figure getting a quick answer is better than waiting.

1 Like

You Won My Heart.
If I Was The Boss I Could Give You A Prize Due To The Quick Response Principle.

Thanks again…

Hi @emojipati :wave:t6: welcome to the forums and i’m glad you’re here. I’m glad you were able to get help from our community. (: