How to Remove the URL Field from the WordPress Comment Form (And 3 Reasons You Shouldn’t)

Last updated:

It’s no secret that WordPress websites attract tons of spam comments, comments that often make no sense whatsoever.

A reputable anti-spam plugin such as Akismet does a really good job at filtering these out, so that you don’t need to waste your time moderating them.

But WordPress websites, especially the ones with a decent level of accumulated authority, also attract comments that aren’t necessarily spam.

These non-spam comments exist because the commenters are hoping to land a backlink to their own website through the website URL field in the comment form.

To minimize these types of comments, WordPress bloggers can choose to have the URL field removed.

But should you really do this?

3 Reasons to Remove the Website Field

Here are 3 legit reasons to remove the website field from the comment form in your WordPress website:

1. Less Spam, Less Time Wasting

Not having the URL field available in your blog will discourage people that are chasing backlinks from commenting on your articles. Full stop.

And this means less time wasted on moderating these comments.

2. Less Broken Links

Old comments are the number one reason why so many WordPress blogs have an excessive amount of broken links.

Websites die all the time, it’s inevitable. So all these old comments on your blog often result in broken links. And broken links are bad, especially when you have too many.

It’s a really bad SEO signal.

3. Less Irrelavent Links

Another reason to have the website URL field removed is that it will stop creating a whirlpool of links to sites that aren’t relevant to your website.

Even if these sites are legit, they aren’t always related to the niche your site is in.

And lots of irrelevant links is not a good SEO signal either.

3 Reasons NOT to Remove the Website Field

There are also some really good reasons to keep the website URL field where it is. And I am one of those people who prefers to keep that field.

There’s one important caveat here though. If you keep the website field enabled, you MUST spend quality time moderating comments, otherwise it’s a lost battle.

Assuming that the website field generally attracts more comments, here are 3 reasons NOT to remove that field:

1. Less Good Comments

Not all comments with links to websites are crap. Yes, the URL field attracts more spam, but it also attracts more good comments.

I actually get quite a few good quality comments on this site, comments that add value. And good comments are always more than welcome.

And if these comments have valid links to sites that are at least okay, I am happy to approve them.

2. Good Comments Are Free Content

Good, long comments are essentially extra content that is absolutely free.

It’s your job as a moderator though to be the judge of that.

3. Comments Generate New Content Ideas

I get a lot of questions asked through comments. And while I don’t approve them all, some of these questions are super valid.

This then gives me ideas for extra content in the articles people are commenting on, or for whole new blog posts.

How to Remove the URL Field

So you still want to do this? Alright.

There are various ways to have the URL field removed from the comments form. Some people use CSS to hide the field, so that it’s still there, it’s just not visible.

The better, and cleaner, way to do this is via a small code change to be added to the Functions PHP file in your WordPress blog. That code change physically removes the field, it doesn’t just hide it.

However, my preferred way of doing this is with a plugin called Code Snippets. This plugin allows you to add, you guessed it, code snippets to your WordPress blog without having to touch the Functions PHP file.

The benefit of this is that the Functions PHP file (which is a super important theme file) remains untouched, and you can manage all custom code changes in one place.

Step 1: Install the Code Snippets Plugin

In your WordPress dashboard, navigate to the Plugins section. Choose Add New and search for Code Snippets. Install and activate that plugin.

Code Snippets WordPress plugin

In case you’re worried about installing another plugin, Code Snippets is a super lightweight, highly reliable plugin that adds value.

Step 2: Implement Code to Remove the URL Field

Navigate to the plugin and choose Add New snippet. In the editor box, add PHP code as per the following image:

Remove WordPress website URL field code

This is the copy/paste version of the code:

add_filter( 'comment_form_default_fields', 'remove_comment_url', 20 );
function remove_comment_url($fields) {
	if(isset($fields['url']))
	unset($fields['url']);
	return $fields;
}

As you can see, nothing too complicated at all.

Step 3: Activate the Code Snippet

Once you’ve created the code snippet and everything looks good, with no syntax errors, click Save Changes and Activate.

Save and activate code snippet

Now go to any blog post and verify that the website URL field isn’t available anymore in the comments form.

That’s it! No more spam, but most likely also a decrease in good comments.

Join Blog Pioneer

​JOIN BLOG PIONEER

​Subscribe now and learn how to grow your ​blog into a thriving business with effective SEO and monetization strategies.

​BONUS: ​3 actionable SEO tips you can implement today to give your blog posts an immediate boost!

 
AJ Mens

I have been running an online business since 2015 and am using Blog Pioneer to help you achieve financial success online.

Leave a Comment