Today, I'll show you the steps needed to deploy a react app to Hostinger. The tutorial will be broken down into the following steps:
Create and B...
For further actions, you may consider blocking this person and/or reporting abuse
Thank you for your article. After unzipping the folder everything worked out fine. Tried to follow other tutorials, they did not work. Glad, I found your article!
Thanks! The .env solution I did need.
We had to unzip the file before uploading (instead of importing the zip) just a note incase it helps others.
Cheers!
Still the clearest guide for this β a couple of notes for anyone landing
here in 2026.
If you're on Vite rather than CRA (create-react-app was deprecated in early
2025, so most new projects are), the equivalents are:
base: '/'in vite.config.js instead ofhomepagein package.jsondist/, notbuild/For the 403 / blank page a few people hit in the comments: the usual cause
is uploading the build folder itself instead of its contents. Files need to
land as public_html/index.html, not public_html/build/index.html. If you
zip, zip from inside the build folder β select the files, not the folder.
Also worth clearing up, since two comments mention it: "The project was
built assuming it is hosted at /" is not an error when you're deploying to
the domain root. That message is correct behaviour β no fix needed.
Thank you for the topic, a couple of issues I got:
The project was built assuming it is hosted at /I couldn't make it to be a domain name as you did, nevertheless, I tried both variants you mentioned.Anyway, it was a big help!
I was also getting same
The project was built assuming it is hosted at /I use .env and it fixed, but still my website not showing up and showing 403 error.
I'll tell you how it worked for me, I created a build folder with npm run build, then with filezilla I exported all the files and folders that were inside the build to public_html. Later in the file manager of my site in hostinger I added the ".htaccess" file with the code shared in this post and it worked with all the routes.
Your article helps me to solve a problem i'm facing since 2 days. Thank you
Would you best, if you can cover auto-deployment via git in a seperate topic as well.
PS: Insightful article
Is this what you're looking for, my friend?
dev.to/mwoodson11/create-deploymen...
FantΓ‘stic, thank you
Thanks π
Thanks it works! π₯³ As it is a single page app it doesn't seem to need the .htaccess file. Is that correct?
Yes you should be good! Also, I've tried redoing this tutorial recently and even with multiple pages, it seems that the file is no longer needed, but I leave that step just in case that problem arises