{"id":453,"date":"2012-02-10T11:36:58","date_gmt":"2012-02-10T11:36:58","guid":{"rendered":"http:\/\/www.vishmax.com\/en\/?p=453"},"modified":"2012-05-19T13:18:07","modified_gmt":"2012-05-19T13:18:07","slug":"block-spam-comments-on-wordpress-with-htaccess","status":"publish","type":"post","link":"https:\/\/www.vishmax.com\/en\/labs\/block-spam-comments-on-wordpress-with-htaccess\/","title":{"rendered":"block spam comments on wordpress with .htaccess"},"content":{"rendered":"<p>Are you running a WordPress site \/blog and getting too many spam comments which makes you frustrated? Then you can block this with the help of .htaccess.<\/p>\n<p>Most spammer attacks your blog by accessing wp-comments-post.php file. Remember that most of them never visit your site and they uses some commenting software\u2019s with a keyword tool. This software searches on internet and finds the wp-comments-post.php files. With the help of software they can send 100 of comments within single click. So take your .htaccess file and add the following lines to it.<\/p>\n<pre lang=\"xml\">\r\n# Protect from spam comments\r\n<IfModule mod_rewrite.c>\r\nRewriteEngine On\r\nRewriteCond %{REQUEST_METHOD} POST\r\nRewriteCond %{REQUEST_URI} .wp-comments-post\\.php*\r\nRewriteCond %{HTTP_REFERER} !.*xyz.* [OR]\r\nRewriteCond %{HTTP_USER_AGENT} ^$\r\nRewriteRule (.*) ^http:\/\/%{REMOTE_ADDR}\/$ [R=301,L]\r\n<\/IfModule>\r\n<\/pre>\n<p>xyz is referring to your blog root or best put your domain name by the way.<\/p>\n<p>Make sure you have make a backup of your original .htaccess rules before apply the spam blocking rules to prevent unnecessary mess ups.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Are you running a WordPress site \/blog and getting too many spam comments which makes you frustrated? Then you can block this with the help of .htaccess. Most spammer attacks your blog by accessing wp-comments-post.php file. Remember that most of them never visit your site and they uses some commenting software\u2019s with a keyword tool. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[44],"tags":[91,94,49],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.2.1 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>block spam comments on wordpress with .htaccess - Vishmax.com<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.vishmax.com\/en\/labs\/block-spam-comments-on-wordpress-with-htaccess\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"block spam comments on wordpress with .htaccess - Vishmax.com\" \/>\n<meta property=\"og:description\" content=\"Are you running a WordPress site \/blog and getting too many spam comments which makes you frustrated? Then you can block this with the help of .htaccess. Most spammer attacks your blog by accessing wp-comments-post.php file. Remember that most of them never visit your site and they uses some commenting software\u2019s with a keyword tool. [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.vishmax.com\/en\/labs\/block-spam-comments-on-wordpress-with-htaccess\/\" \/>\n<meta property=\"og:site_name\" content=\"Vishmax.com\" \/>\n<meta property=\"article:published_time\" content=\"2012-02-10T11:36:58+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2012-05-19T13:18:07+00:00\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.vishmax.com\/en\/labs\/block-spam-comments-on-wordpress-with-htaccess\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.vishmax.com\/en\/labs\/block-spam-comments-on-wordpress-with-htaccess\/\"},\"author\":{\"name\":\"admin\",\"@id\":\"http:\/\/www.vishmax.com\/en\/#\/schema\/person\/785fa94b56eb17ae7706d30777d6ab93\"},\"headline\":\"block spam comments on wordpress with .htaccess\",\"datePublished\":\"2012-02-10T11:36:58+00:00\",\"dateModified\":\"2012-05-19T13:18:07+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.vishmax.com\/en\/labs\/block-spam-comments-on-wordpress-with-htaccess\/\"},\"wordCount\":139,\"commentCount\":0,\"publisher\":{\"@id\":\"http:\/\/www.vishmax.com\/en\/#organization\"},\"keywords\":[\".htaccess\",\"Web Design Tips\",\"WordPress\"],\"articleSection\":[\"Labs\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.vishmax.com\/en\/labs\/block-spam-comments-on-wordpress-with-htaccess\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.vishmax.com\/en\/labs\/block-spam-comments-on-wordpress-with-htaccess\/\",\"url\":\"https:\/\/www.vishmax.com\/en\/labs\/block-spam-comments-on-wordpress-with-htaccess\/\",\"name\":\"block spam comments on wordpress with .htaccess - Vishmax.com\",\"isPartOf\":{\"@id\":\"http:\/\/www.vishmax.com\/en\/#website\"},\"datePublished\":\"2012-02-10T11:36:58+00:00\",\"dateModified\":\"2012-05-19T13:18:07+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.vishmax.com\/en\/labs\/block-spam-comments-on-wordpress-with-htaccess\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.vishmax.com\/en\/labs\/block-spam-comments-on-wordpress-with-htaccess\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.vishmax.com\/en\/labs\/block-spam-comments-on-wordpress-with-htaccess\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"http:\/\/www.vishmax.com\/en\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"block spam comments on wordpress with .htaccess\"}]},{\"@type\":\"WebSite\",\"@id\":\"http:\/\/www.vishmax.com\/en\/#website\",\"url\":\"http:\/\/www.vishmax.com\/en\/\",\"name\":\"Vishmax.com\",\"description\":\"Software Company in Calicut for Web Design and eCommerce\",\"publisher\":{\"@id\":\"http:\/\/www.vishmax.com\/en\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"http:\/\/www.vishmax.com\/en\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"http:\/\/www.vishmax.com\/en\/#organization\",\"name\":\"Vishmax.com\",\"url\":\"http:\/\/www.vishmax.com\/en\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"http:\/\/www.vishmax.com\/en\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.vishmax.com\/en\/wp-content\/uploads\/2023\/03\/logo-vishmax.png\",\"contentUrl\":\"https:\/\/www.vishmax.com\/en\/wp-content\/uploads\/2023\/03\/logo-vishmax.png\",\"width\":150,\"height\":50,\"caption\":\"Vishmax.com\"},\"image\":{\"@id\":\"http:\/\/www.vishmax.com\/en\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"http:\/\/www.vishmax.com\/en\/#\/schema\/person\/785fa94b56eb17ae7706d30777d6ab93\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"http:\/\/www.vishmax.com\/en\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/e218268870406c917d20b442936d9e68?s=96&d=monsterid&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/e218268870406c917d20b442936d9e68?s=96&d=monsterid&r=g\",\"caption\":\"admin\"},\"url\":\"https:\/\/www.vishmax.com\/en\/author\/admin\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"block spam comments on wordpress with .htaccess - Vishmax.com","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.vishmax.com\/en\/labs\/block-spam-comments-on-wordpress-with-htaccess\/","og_locale":"en_US","og_type":"article","og_title":"block spam comments on wordpress with .htaccess - Vishmax.com","og_description":"Are you running a WordPress site \/blog and getting too many spam comments which makes you frustrated? Then you can block this with the help of .htaccess. Most spammer attacks your blog by accessing wp-comments-post.php file. Remember that most of them never visit your site and they uses some commenting software\u2019s with a keyword tool. [&hellip;]","og_url":"https:\/\/www.vishmax.com\/en\/labs\/block-spam-comments-on-wordpress-with-htaccess\/","og_site_name":"Vishmax.com","article_published_time":"2012-02-10T11:36:58+00:00","article_modified_time":"2012-05-19T13:18:07+00:00","author":"admin","twitter_card":"summary_large_image","twitter_misc":{"Written by":"admin","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.vishmax.com\/en\/labs\/block-spam-comments-on-wordpress-with-htaccess\/#article","isPartOf":{"@id":"https:\/\/www.vishmax.com\/en\/labs\/block-spam-comments-on-wordpress-with-htaccess\/"},"author":{"name":"admin","@id":"http:\/\/www.vishmax.com\/en\/#\/schema\/person\/785fa94b56eb17ae7706d30777d6ab93"},"headline":"block spam comments on wordpress with .htaccess","datePublished":"2012-02-10T11:36:58+00:00","dateModified":"2012-05-19T13:18:07+00:00","mainEntityOfPage":{"@id":"https:\/\/www.vishmax.com\/en\/labs\/block-spam-comments-on-wordpress-with-htaccess\/"},"wordCount":139,"commentCount":0,"publisher":{"@id":"http:\/\/www.vishmax.com\/en\/#organization"},"keywords":[".htaccess","Web Design Tips","WordPress"],"articleSection":["Labs"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.vishmax.com\/en\/labs\/block-spam-comments-on-wordpress-with-htaccess\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.vishmax.com\/en\/labs\/block-spam-comments-on-wordpress-with-htaccess\/","url":"https:\/\/www.vishmax.com\/en\/labs\/block-spam-comments-on-wordpress-with-htaccess\/","name":"block spam comments on wordpress with .htaccess - Vishmax.com","isPartOf":{"@id":"http:\/\/www.vishmax.com\/en\/#website"},"datePublished":"2012-02-10T11:36:58+00:00","dateModified":"2012-05-19T13:18:07+00:00","breadcrumb":{"@id":"https:\/\/www.vishmax.com\/en\/labs\/block-spam-comments-on-wordpress-with-htaccess\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.vishmax.com\/en\/labs\/block-spam-comments-on-wordpress-with-htaccess\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.vishmax.com\/en\/labs\/block-spam-comments-on-wordpress-with-htaccess\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"http:\/\/www.vishmax.com\/en\/"},{"@type":"ListItem","position":2,"name":"block spam comments on wordpress with .htaccess"}]},{"@type":"WebSite","@id":"http:\/\/www.vishmax.com\/en\/#website","url":"http:\/\/www.vishmax.com\/en\/","name":"Vishmax.com","description":"Software Company in Calicut for Web Design and eCommerce","publisher":{"@id":"http:\/\/www.vishmax.com\/en\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"http:\/\/www.vishmax.com\/en\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"http:\/\/www.vishmax.com\/en\/#organization","name":"Vishmax.com","url":"http:\/\/www.vishmax.com\/en\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"http:\/\/www.vishmax.com\/en\/#\/schema\/logo\/image\/","url":"https:\/\/www.vishmax.com\/en\/wp-content\/uploads\/2023\/03\/logo-vishmax.png","contentUrl":"https:\/\/www.vishmax.com\/en\/wp-content\/uploads\/2023\/03\/logo-vishmax.png","width":150,"height":50,"caption":"Vishmax.com"},"image":{"@id":"http:\/\/www.vishmax.com\/en\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"http:\/\/www.vishmax.com\/en\/#\/schema\/person\/785fa94b56eb17ae7706d30777d6ab93","name":"admin","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"http:\/\/www.vishmax.com\/en\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/e218268870406c917d20b442936d9e68?s=96&d=monsterid&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/e218268870406c917d20b442936d9e68?s=96&d=monsterid&r=g","caption":"admin"},"url":"https:\/\/www.vishmax.com\/en\/author\/admin\/"}]}},"_links":{"self":[{"href":"https:\/\/www.vishmax.com\/en\/wp-json\/wp\/v2\/posts\/453"}],"collection":[{"href":"https:\/\/www.vishmax.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.vishmax.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.vishmax.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.vishmax.com\/en\/wp-json\/wp\/v2\/comments?post=453"}],"version-history":[{"count":0,"href":"https:\/\/www.vishmax.com\/en\/wp-json\/wp\/v2\/posts\/453\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.vishmax.com\/en\/wp-json\/wp\/v2\/media?parent=453"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.vishmax.com\/en\/wp-json\/wp\/v2\/categories?post=453"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.vishmax.com\/en\/wp-json\/wp\/v2\/tags?post=453"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}