For security reasons, we recommend that you prevent unauthorized access to your .htaccess file.
To do this, you need to understand how to find this file.
You can edit the .htaccess file using an FTP client or using cPanel.
Add security code to .htaccess file
Step 1:
Log in to your cPanel account and open “File Manager” in the Files section.
You must have made the correct settings to show hidden files.
Because the .htaccess file is a hidden file with a dot prefix; It means you can see it if you haven't turned it on to be visible.
Step 2:
You should look for ".htaccess" in the public_html directory.
Right click to edit the file and click Edit.
Step 3
Add this code:
# .htaccess protection
order allow,deny
deny from all
satisfy all
Click the "Save Changes" button displayed in the upper right corner.