A free and open-source book on ZF3 for beginners


2.8. Blocking Access to the Website by IP Address

Sometimes it may be required to block access to your website from all other IP addresses except yours. For example, when you develop a website, you don't want someone to see your incomplete work. Also, you may not want to let Google or other search engines to index your website.

To forbid access to your site, you can modify the virtual host and add the following line to it:

Require ip <your_ip_address>

How do I determine my IP address?

You can use the http://www.whatismyip.com website to determine your external IP address. The external IP address is the address by which other computers on the Internet may access your site.


Top