{"id":2694,"date":"2017-04-28T08:14:37","date_gmt":"2017-04-28T08:14:37","guid":{"rendered":"http:\/\/www.icantinternet.org\/?p=2694"},"modified":"2017-04-28T14:38:15","modified_gmt":"2017-04-28T14:38:15","slug":"banning-people-from-your-blog","status":"publish","type":"post","link":"https:\/\/beheydt.be\/en\/banning-people-from-your-blog\/","title":{"rendered":"Banning People from your Blog"},"content":{"rendered":"<p><b><span style=\"text-decoration: underline;\"><a href=\"http:\/\/www.icantinternet.org\/wp-content\/images9.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignright size-full wp-image-2695\" src=\"http:\/\/www.icantinternet.org\/wp-content\/images9.jpg\" alt=\"images\" width=\"263\" height=\"192\" \/><\/a><\/span><\/b>A blog attracts all kinds of people; there are some who simply read the blog post, as well as some who comments on the content there. However, there are those who visit the site only to cause trouble with the community or the blogger him\/herself, or even take content from your own site and call it his\/her own, perhaps even taking the theme of your blog.<\/p>\n<p>You need to get these kinds of people to stop, but seeing as how these kinds of people aren\u2019t likely to listen to reason, you will have to use your powers as owner of the blog to get them to stop. How do you do that? By blocking them from visiting your blog, effectively banning them. There are multiple ways of blocking someone from visiting your blog. Here are the ways:<\/p>\n<p><b>Banning via IP block<\/b><\/p>\n<p>The first method is to block that visitor\u2019s IP address. To do this, access your .htaccess file in your server\u2019s root directory and add the following rules:<\/p>\n<p>order allow,deny<\/p>\n<p>deny from xxx.xxx.xxx.xxx<\/p>\n<p>allow from all<\/p>\n<p>The \u201cxxx.xxx.xxx.xxx\u201d is where you place the offender\u2019s IP address. This only works against those who use static IP address; for dynamic IP addresses, which is possibly more likely given that some troublemakers can be tenacious, you will have to define a range of IP addresses, which is for the more advanced bloggers. For example, if you want to block the IP range of 101.123.12.0 \u2013 101.123.13.255, you have to put the following rules into the .htaccess file:<\/p>\n<p>deny from 101.123.12.0\/23<\/p>\n<p>or<\/p>\n<p>deny from 101.123.12.0\/255.255.254.0<\/p>\n<div id=\"attachment_5424\" style=\"width: 250px\" class=\"wp-caption alignright\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-5424\" class=\"wp-image-5424 size-medium\" src=\"https:\/\/beheydt.be\/wp-content\/uploads\/2013\/01\/IMG_0088-240x300.png\" alt=\"Cloudy grey with a hint of blue sky - Bjorn Beheydt - Fotografie Luna - Landscape photography\" width=\"240\" height=\"300\" srcset=\"https:\/\/beheydt.be\/wp-content\/uploads\/2013\/01\/IMG_0088-240x300.png 240w, https:\/\/beheydt.be\/wp-content\/uploads\/2013\/01\/IMG_0088-768x960.png 768w, https:\/\/beheydt.be\/wp-content\/uploads\/2013\/01\/IMG_0088-819x1024.png 819w, https:\/\/beheydt.be\/wp-content\/uploads\/2013\/01\/IMG_0088.png 1638w\" sizes=\"(max-width: 240px) 100vw, 240px\" \/><p id=\"caption-attachment-5424\" class=\"wp-caption-text\">Cloudy grey with a hint of blue sky &#8211; Bjorn Beheydt<\/p><\/div>\n<p><b>Banning via Internet Service Provider<\/b><\/p>\n<p>The second method of banning is to block that visitor\u2019s Internet Service Provider. To do just that, place the following rules into your .htaccess file:<\/p>\n<p>order allow,deny<\/p>\n<pre>Deny from *ISPname*.com<\/pre>\n<pre>allow from all<\/pre>\n<p>Simple enough, although this will mean that anyone else who is subscribed to that ISP would also be effectively banned from visiting your site.<\/p>\n<p><b>Banning visitors from a certain country<\/b><\/p>\n<p>The third method is a little extreme, but allows you to block visitors from a certain country. There are two ways of you to do this: by doing it manually by learning all the IP address ranges from the country you want to ban, or by using a code generating service that gives you code you can place in your .htaccess file to ban that particular country. One such site you can use is <a href=\"http:\/\/www.nirsoft.net\/countryip\/\">nirsoft.com<\/a>, where you can receive a code detailing a list of IP ranges for the country of your choice and placing the code into your .htaccess file.<\/p>\n<p><b>Banning visitors from a certain continent<\/b><\/p>\n<p>The fourth, last and perhaps the most extreme method of blocking visitors. Just like the previous method, there are sites that provide codes that detail IP ranges that span across a whole continent. One such site you can visit is again <a href=\"http:\/\/www.nirsoft.net\/countryip\/\">nirsoft.com<\/a>, where you can receive codes that you can copy and paste into your .htaccess file to block whole continents.<\/p>\n<p><b>Final words and thoughts<\/b><\/p>\n<p>And those are the methods you can use to block unwanted visitors from visiting your site. If you want only a specific region to access your site, you can choose to use the third and fourth methods, but if you just want to block this one troublemaker from entering your site, it would be best to simply use the first method.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A blog attracts all kinds of people; there are some who simply read the blog post, as well as some who comments on the content there. However, there are those who visit the site only to cause trouble with the community or the blogger him\/herself, or even take content from your own site and call [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":5424,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_et_pb_use_builder":"","_et_pb_old_content":"","_et_gb_content_width":"","jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[929],"tags":[142,880,899],"class_list":["post-2694","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blogging-icantinternet-en","tag-blogging","tag-webmaster","tag-wordpress"],"jetpack_featured_media_url":"https:\/\/beheydt.be\/wp-content\/uploads\/2013\/01\/IMG_0088.png","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/pbkKxJ-Hs","jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/beheydt.be\/en\/wp-json\/wp\/v2\/posts\/2694","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/beheydt.be\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/beheydt.be\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/beheydt.be\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/beheydt.be\/en\/wp-json\/wp\/v2\/comments?post=2694"}],"version-history":[{"count":0,"href":"https:\/\/beheydt.be\/en\/wp-json\/wp\/v2\/posts\/2694\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/beheydt.be\/en\/wp-json\/wp\/v2\/media\/5424"}],"wp:attachment":[{"href":"https:\/\/beheydt.be\/en\/wp-json\/wp\/v2\/media?parent=2694"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/beheydt.be\/en\/wp-json\/wp\/v2\/categories?post=2694"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/beheydt.be\/en\/wp-json\/wp\/v2\/tags?post=2694"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}