DEV Community

Cover image for Deploy ReactJS app on shared hosting like GoDaddy, Hostinger etc.
Manoj Bhadane
Manoj Bhadane

Posted on

Deploy ReactJS app on shared hosting like GoDaddy, Hostinger etc.

Step 1 : Create .htaccess file in public folder and below content in it

Options -MultiViews
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.html [QSA,L]

Step 2: Build app using npm or yarn

npm run build
or
yarn run build

Step 3: Upload content of build/ directory in to public_html/ directory on shared hosting

Done.

Please follow to get updated posts and hit like to motivate me
Thanks πŸ˜ŠπŸ™

Top comments (1)

Collapse
 
jagdishlove profile image
Jagdish Singh Mehra

Can you please tell, how to deploy it through github repo, I am gettign 403 even after setting up everything