Reduce spam from your WordPress website.
What is one of the most annoying things you have to deal with when running a WordPress site? Spam. You put in a lot of hard work on your website and no matter what, spam always appears. Unfortunately there is no magic bullet that will get rid of all of it in one swipe. But there are ways to fight against it and removing the website URL from the WordPress comments section is a good one.
Why Should I Do This?
To understand how this fights spam, you need to understand how the website URL works in the WordPress comments section. When a visitor leaves a comment and fills in their name and the website URL, WordPress creates a hyperlink of that website to their name. So basically a spammer could fill in the name field with the keyword they are trying to rank for and then fill in the website field with their website. This creates a backlink, which helps them increase their search rankings. Not very polite of them is it?
Does this hurt my WordPress website?
No, it doesn’t hurt you in the least little bit. By removing the website URL field all you are doing is keeping that hyperlink from getting created. If someone is going to leave a comment, which could be a legitimate question or a comment that contributes to the article, they will do it regardless if there is a website field or not. All this does is act as an initial filter for all the immoral spammers out there.
So How Do I Remove This From WordPress?
There are a few WordPress plugins out there that can do the job, but I’ve found that it is much simpler to just add a few lines of code to your WordPress theme and be done with it. It does require editing a file, but it’s pretty simple and even a newbie shouldn’t have any problem.
Log in to your WordPress admin area.
Hover your mouse over the “Appearance” tab and then select “Editor”.
When this screen appears, locate the “functions.php” file over in the right hand pane of the screen.
Click on it and you should see the editor title and window change to this file.
Scroll all the way to the bottom of the file and add the following code
Once this is done hit the “Update File” button below the editor.
That’s it. You can now visit your website and the changes should take effect almost immediately. If you have your website already open in a browser, you may need to refresh it. If you have your WordPress site cached with a plugin like W3 Total Cache or something similar, you may also need to refresh it. This is just one step in your defense against spam, one of the best ways is to use a plugin to fight against automated spam. The best in the business is Askimet. I’ll be posting a tutorial soon demonstrating how to set it up.