{"id":96,"date":"2008-06-16T07:25:39","date_gmt":"2008-06-16T15:25:39","guid":{"rendered":"http:\/\/www.zenutech.com\/kb\/?p=96"},"modified":"2024-03-28T08:13:30","modified_gmt":"2024-03-28T13:13:30","slug":"how-do-i-block-access-to-my-site","status":"publish","type":"post","link":"https:\/\/www.zenutech.com\/kb\/article\/how-do-i-block-access-to-my-site\/","title":{"rendered":"How do I block access to my site?"},"content":{"rendered":"<p>You can setup restricted access using <a href=\"\/kb\/article\/setting-up-a-password-protected-directory\/\">htpasswd<\/a> protection &#8211; this allows only those with the password to access the site.<\/p>\n<p>It is possible to block access to your website from either specific IP addresses, a range of addresses, or an entire domain. This is done by creating or modifying a .htaccess file in the root folder of your website to match one of the following formats:<\/p>\n<p>For a specific IP address:<\/p>\n<blockquote><p>order allow, deny<br \/>\nallow all<br \/>\ndeny 169.254.333.236<\/p><\/blockquote>\n<p>169.254.333.263 will be unable to view the website. For a range of IP addresses:<\/p>\n<blockquote><p>order allow, deny<br \/>\nallow all<br \/>\ndeny 169.254.333<\/p><\/blockquote>\n<p>This will prevent any IPs starting with 169.254.333 from viewing the website, such as 169.254.333.1, 169.254.333.2, etc. For a domain:<\/p>\n<blockquote><p>order allow, deny<br \/>\nallow all<br \/>\ndeny *.spamserv.com<\/p><\/blockquote>\n<p>Nobody trying to connecting from spamserv.com will be able to view the website.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Allowing or denying access to individuals or groups<\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[161],"tags":[165,164,162,143,163],"class_list":["post-96","post","type-post","status-publish","format-standard","hentry","category-site-management","tag-access-control","tag-apache","tag-block","tag-htaccess","tag-order"],"_links":{"self":[{"href":"https:\/\/www.zenutech.com\/kb\/wp-json\/wp\/v2\/posts\/96","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.zenutech.com\/kb\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.zenutech.com\/kb\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.zenutech.com\/kb\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.zenutech.com\/kb\/wp-json\/wp\/v2\/comments?post=96"}],"version-history":[{"count":4,"href":"https:\/\/www.zenutech.com\/kb\/wp-json\/wp\/v2\/posts\/96\/revisions"}],"predecessor-version":[{"id":677,"href":"https:\/\/www.zenutech.com\/kb\/wp-json\/wp\/v2\/posts\/96\/revisions\/677"}],"wp:attachment":[{"href":"https:\/\/www.zenutech.com\/kb\/wp-json\/wp\/v2\/media?parent=96"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.zenutech.com\/kb\/wp-json\/wp\/v2\/categories?post=96"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.zenutech.com\/kb\/wp-json\/wp\/v2\/tags?post=96"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}