Stop SPAM Users and Bots registration on WordPress Website

Category : WordPress

Using a custom sign-up plugin on user registration and facing SPAM signups on the native WordPress signup page via htaccess ? In this guide, we will help you stop the spam signup on your website using .htaccess rules.


  1. Login to FTP/Filemanager.
  2. Edit .htaccess files and append the following code in it
    #BLOCK SPAM REGISTRATION REQUESTS (wp-login.php?action=register)
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteCond %{THE_REQUEST} ^.*(wp-login.php\?action=register).* [NC]
    RewriteRule ^(.*)$ - [F,L]

After adding above .htaccess rules if any BOT or user opens /wp-login.php page for registering they will get Access denied error and won’t be able to register.