How to deny access to website using .htaccess


In some cases, you might want to block your website for several reasons. Follow the methods below to achieve this

1. Navigate to your hosting control panel
2. Go to public_html directory where .htaccess is located at
3. Edit the .htaccess file
4. Add this to the top of your .htaccess file
Order Deny,Allow
Deny from all

  Print