How to Block Someone From Viewing Your Website

Save

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]
    </Limit>

    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]
    </Directory>

  • 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.

References

Promoted By Zergnet

Comments

You May Also Like

Related Searches

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