.HTAccess – Allowing and Denying IP addresses

Allow Only Specific IP Addresses

This is a useful code snippet for .htaccess to allow website access to only specific IP addresses, we normally use this for clients when in development mode so only us and the client can view the website.

Order deny,allow
Deny from All
Allow from xxx.xxx.xxx.xxx
Allow from xxx.xxx.xxx.xxy

Allow All and Deny Specific IP Addresses

Order deny,allow
Allow from All
Deny from xxx.xxx.xxx.xxx
Deny from xxx.xxx.xxx.xxy

Please make a back up of your .htaccess file before you make these changes.

NEED HELP?

If you are struggling to implement the SVG snippet then we can help from £9.99 – use our contact form below and we will get straight back to you!

HELP ME IMPLEMENT THIS SNIPPET

Leave a comment

Shares