• Skip to primary navigation
  • Skip to content
  • Skip to primary sidebar
  • Skip to footer
  • Skip to footer navigation
  • Services
  • Our Themes
  • Start a WordPress Blog
  • WordPress Hosting
WPArena

WPArena

WPArena covers all things related to WordPress: Themes, Plugins, Tutorials, Guides, Deals and Beginner tips.

  • News
    • Opinion
  • Tutorials
  • Reviews
    • Themes
    • Plugins
  • Comparisons
  • Collections
    • Education Themes
    • Genesis Child Themes
    • Best Responsive Themes
    • Medical WordPress Themes
    • Finance & Business Themes
    • Crowdfunding Themes
  • Resources
    • Inspiration
  • Deals
WPARENA » Tutorials

How To Redirect The Spammers Where You Want To?

TwitterFacebookWhatsAppGoogle+BufferLinkedInPin It

WordPress is my favorite platform for blogging as well spambots love to target WordPress’ comment script directly by using automatic commenting plug-ins.  There is the best way to bounce them back or on another page, where ever you want to simply by editing your .htaccess file.

How to redirect the spammers where you want

Here is the script to add to your WordPress blogs (or into your site’s) .htaccess file:

# block comment spam by denying access to no-referrer requests
RewriteEngine On
RewriteCond %{REQUEST_METHOD} POST
RewriteCond %{REQUEST_URI} .wp-comments-post\.php*
RewriteCond %{HTTP_REFERER} !.*wparena.com.* [OR]
RewriteCond %{HTTP_USER_AGENT} ^$
RewriteRule ^(.*)$ ^http://the-site-where-you-want-to-send-spammers.com/$ [R=301,L]

You need to  change the following lines according to your specific setup:

.wp-comments-post\.php*  = Default for WordPress User

If you are not using WordPress,  add the file name which you are using for comments.

!.*wparena.com.* = Change it with your own domain name

^http://the-site-where-you-want-to-send-spammers.com/$

Enter your least favorite website address here. If you want to bounce them back where they are coming from than simply replace the above line with this:

RewriteRule ^(.*)$ ^http://%{REMOTE_ADDR}/$ [R=301,L]

After setting up these line of codes in your .htaccess file you immediately eliminate a large portion of blog spam.

You Might Also Like These Posts:

  • Getting To Know The WordPress Dashboard
  • Common Uses for WordPress Plugins
  • How To Upload WordPress Plugins via FTP
  • How to Display Links Categories in Different Sidebar Widgets
  • What To Do With A New WordPress Blog
Noor Mustafa Raza

Noor Mustafa Raza

I am a WordPress Developer and Designer, author @WPArena. I am providing Free WordPress consultation and can help you to install WordPress in a secure way to small businesses and bloggers.

Previous Post How To Setup Webmaster Tools Verification for Blogs and Websites
Next Post Theme Design Complete: Where Do I Promote My WordPress Theme

Reader Interactions

Leave a Reply Cancel reply

Thank you for choosing to leave a comment on WPArena. Please bear in mind that all comments are moderated according to our comment policy. Your email address will never be published but is required. Do NOT use keywords in the name field. First name is fine with us. Lets have a meaningful conversation and respect others opinions.

Primary Sidebar

Over 40,000+ Readers

Get fresh content from WPArena

Recent Posts

  • What Marketing Do Customers Take Notice Of?
  • Ad-Maven Review: One of the best monetization tools out there
  • Four Best WordPress Plugins for Content Marketers
  • CometNine Review – A lesser known web host with great features
  • 7 Must-Have Google Chrome Extensions For Bloggers

Our Services

WordPress
Installation
WordPress
Performance
WordPress
Security
WordPress
SEO
WordPress
Errors
Building an
Online Store

Footer

About

WPArena is a premium online resource site of WordPress and is focused on providing excellent WordPress Tutorials, Guides, Tips, and Collections. The site design is updated at regular intervals with more features. Look here.
You can read more about WordPress Arena here.


WPArena Marketing Material

Resources

  • Best WordPress Plugins
  • WordPress Permalinks Structure
  • Email Management System
  • Envato Free Files

Reviews

  • Beaver Builder Review
  • Beaver Themer Review
  • WP User Frontend Pro
  • Ninja Forms Review
  • MemberPress Review

More Reviews »

Deals

  • Clickright Theme 30% OFF
  • Hostgator Coupon
  • ionMag Theme 30% OFF
  • OIO Publisher 20% OFF

More Deals »

© 2019 · WordPress Arena · All Rights Reserved.
We are not affiliated with Automattic or WordPress.

  • About
  • Advertise
  • Write for us
  • Disclosure
  • Terms
  • Privacy
  • Contact