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
Show More

Instructions

  1. Blocking Someone From Your Website

    • 1

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

    • 2

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

    • 3

      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.

    • 4

      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>

    • 5

      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:

References

Resources

Comments

You May Also Like

Related Ads

Featured