.htaccess (hypertext access) is a configuration file used to set up some rules related to a website's access. Since this file is optional, you may need to create it in order to add certain instructions - for example, a redirect or to force HTTPS.
To create an .htaccess file from your panel, go to Websites → Manage, search for File Manager on the sidebar and click on it:
Navigate to the folder where you wish to create the .htaccess file and click on New File on the left:
Enter the name
.htaccess (make sure the dot is added at the beginning) and click on Create:
Creating an .htaccess File in cPanel
In case you're using cPanel, all you need to do is open your cPanel account and select the File Manager:
Open the needed directory. If you want the rules in the file to apply to the whole website, you need to open public_html.
Then click on the + File icon:
Input “.htaccess” (make sure the dot is added at the beginning) and click on Create:
In case you don’t see .htaccess on your public_html, try enabling hidden files.
That's it! your .htaccess file is created and you can now edit it 😊