How to Block Someone From Viewing Your Website


Blocking someone from your website is an easy process. This allows you to keep out potential spammers and trolls and helps keep your website safe for legitimate users.

Things You'll Need

  • Website run on an Apache server
  • FTP software
  • Text editor
  • IP address of the person you want to block

Blocking Someone From Your Website

  • Using your FTP software, check your main website directory for a .htaccess file. Download it and rename it htaccess.txt.

  • If you do not have a .htaccess file, open your text editor and create a file called htaccess.txt.

  • Type the following text into your file:
    <Limit GET HEAD POST>
    Order Allow,Deny
    Allow from all
    Deny from [Enter IP address here]

    Save the file.

  • Alternatively, you may specify the directory by using:
    <Directory /name and path to directory/>
    Order Allow,Deny
    Allow from all
    Deny from [Enter IP address here]

  • Save and upload the file to your main website directory via your FTP software. Rename the file .htaccess.

Tips & Warnings

  • If your website is hosted on a Microsoft server, you will need to contact your hosting company and have them block the person for you.
  • This action might block legitimate users who use the same IP address.

Related Searches


Promoted By Zergnet


You May Also Like

  • How to Block People on Facebook

    In order to block people from viewing a Facebook profile, log into a Facebook account, select the "Privacy" link and enter the...

Related Searches

Is DIY in your DNA? Become part of our maker community.
Submit Your Work!