First, check if hidden file preview is turned on (.htaccess is a hidden file, like any file that has . at the beginning of its name):
- Log in to cPanel
- Open the File Manager application
- Click on the Settings option in the upper right corner of the screen
- In the window that opens, check the option Show Hidden Files (dotfiles)
Then insert the following line into the existing .htaccess file:
Redirect 301 / https://address-to-redirect-to.com/
Note:
- Instead of "address-to-redirect-to.com" type the address you want the domain to redirect to.
- If there is no .htaccess file on your hosting, you need to create it