OscarminiOscarmini
  • Home
  • Reviews
  • Computers
  • How Tos
  • Travel & Lifestyle
  • Phone ROMs
  • Contact
    • Advertise
    • About Us
Facebook Twitter Instagram
OscarminiOscarmini
  • Home
  • Reviews
  • Computers
  • How Tos
  • Travel & Lifestyle
  • Phone ROMs
  • Contact
    • Advertise
    • About Us
OscarminiOscarmini
Home»Programming»Reduce spam on your WordPress blog using .htaccess
Programming

Reduce spam on your WordPress blog using .htaccess

Oscar FrankBy Oscar Frank1 Min Read
Share
Facebook Twitter LinkedIn WhatsApp Pinterest Email

When it comes to using wordpress as a blogging platform, you can agree with me that spam is one thing that would piss you off if not treated properly. I recently made a post on the Best Anti Spam Plugins which would help you defeat the war of spammers on your blog.

reduce spam using .htaccess in wordpress

 

 

Here is another approach to defeat spammers using the .htaccess file.

 

 

It would involve you editing your .htacess code as shown below, or simple copy this and paste. Remember to change yourdomain to your domain name.

 

 

 

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_METHOD} POST
RewriteCond %{REQUEST_URI} .wp-comments-post\.php*
RewriteCond %{HTTP_REFERER} !.*yourdomainname.* [OR]
RewriteCond %{HTTP_USER_AGENT} ^$
RewriteRule (.*) ^http://%{REMOTE_ADDR}/$ [R=301,L]
</IfModule>

Note: It is recommended that you backup your .htaccess file before performing this casre. It can be reused if something goes wrong.

Hope this WordPress tip was helpful.

blogging Wordpress

Related Posts

Navigating Coding Difficulties; What To Do When You Hit A Snag

February 11, 2022

Common Mistakes Newbie Developers Make and Solutions

March 23, 2021

WordPress Blog Hosting made easy with SeekaHost Blog Hosting Control Panel

December 4, 2020
Add A Comment

Leave A Reply Cancel Reply

Recent Posts
  • 10 Insane TikTok Trends That Shook The Internet
  • 10 Tech Innovations that will Change the Way we Live & Work
  • Curacel, a Nigerian Insurtech Startup, Raises $3 Million
  • Google Redesigns and Upgrades Gboard Toolbar
  • Internet Explorer to be Permanently Disabled
Get Exclusive Tech Insights!
Oscarmini
Facebook Twitter Instagram YouTube
© 2023 Oscarmini Co. Designed by illBytes.

Type above and press Enter to search. Press Esc to cancel.