Do you want to remove the website URL field from your WordPress comment form?
Many bots and spammers use this field to get backlinks to their sites. By removing the ‘Website’ field, you can immediately make your site less attractive to spammers.
In this article, we will show you how to remove the website URL field from the WordPress comment form.
Why Do People Submit Spam Comments?
Since most spam is generated by automated bots, you can easily combat comment spam using free tools and plugins. However, it’s much more difficult to stop spam comments that are submitted by people.
These comments are often off-topic, irrelevant, and add no value to the conversation.
When it shows comments, WordPress automatically links the person’s username with the website URL they provided. Spammers may use this field to get backlinks or to try and get better rankings for specific keywords.
By removing the website URL field, you can discourage spammers from posting on your WordPress blog or website.
Genuine users will leave a comment no matter whether they get a backlink or not, so this shouldn’t impact how many quality comments you get.
That being said, let’s take a look at how to easily remove the website field from your WordPress site’s comment form. You can use the quick links below to jump straight to the method you want to use:
Method 1: Remove Website URL Field With Thrive Comments (Recommended)
The first method uses Thrive Comments, the best comment plugin for WordPress.
Besides preventing users from inserting spammy URLs, you can also use the plugin to boost your comment engagement. For example, you can allow users to like and dislike comments and even redirect commenters to a relevant post to increase your pageviews.
For more information, check out our full Thrive Themes review, where we talk more about Thrive Comments.
First, go to the Thrive Themes website to create a new account and get a paid plan.
Once signed up, simply go to the account dashboard.
Here, click the ‘Download and install the Thrive Product Manager plugin’ link.
At this stage, you can install the Thrive Product Manager plugin on your WordPress site. For more details, please see our guide on how to install a WordPress plugin.
Now, go to the Product Manager page from your WordPress admin area and click the ‘Log into my account’ button.
You should now see the Thrive Product Manager dashboard.
Here, just select Thrive Comments and click the ‘Install selected products’ button.
There should be a success message saying ‘Ready to use’ once the installation is done.
Now, just click the ‘Go to the Thrive Themes Dashboard’ button at the bottom.
On the next page, you will see all your installed plugins in the suite.
Click the ‘Thrive Comments’ button to start using the plugin.
On the Thrive Comments page, open the ‘Comment Sign-In’ menu.
Then, disable the ‘Allow guests to insert their website URLs’ setting.
This option will remove the website URL field from your WordPress website.
This way, your comment section will remain free of spam and your genuine commenters won’t accidentally click on malicious links.
That’s it. If you’re interested in using Thrive Comments to improve your comment section, here are other guides you can check out:
- How to Feature or Bury Comments in WordPress
- How to Allow Your Users to Subscribe to Comments in WordPress
- How to Allow Blog Users to Moderate Comments in WordPress
Method 2: Remove Website URL Field With a Free Plugin
If you want to remove the URL field from your WordPress comment form with a free plugin, then check out Comment Link Remove and Comment Tools.
This plugin lets you remove the field and also delete any links from comments you have already approved.
First, you need to install and activate the Comment Link Remove and Comment Tools plugin. For detailed instructions, see our guide on how to install a WordPress plugin.
Upon activation, click on Comment Tools » Comment Tools in the WordPress dashboard.
Here, check the box next to ‘Remove WEBSITE Field from Comment Form.’ This will discourage spammers from inserting their links.
That said, all the comments you previously approved will still contain a link. To remove these URLs, simply check the box next to ‘Remove hyperlink from comment AUTHOR Bio.’
We also recommend checking off the ‘Disable turning URLs into hyper-links in comments’ setting. This option prevents URLs in comments from being displayed as clickable hyperlinks.
Other than that, you can optionally enable the ‘Remove HTML Link Tags in comments’ option. This setting removes the HTML tags that create hyperlinks in comments. This ensures that any URLs or links in comments are not displayed as clickable links.
Once done, just scroll to the bottom of the page and click on the ‘Save Changes’ button to store your settings.
To see this change in action, either log out of your account or visit your website in an incognito tab.
You will see the comment form no longer has a website URL field.
Additionally, comment author names that used to have links will no longer have them, and users won’t be able to click on them anymore.
One of the tell-tale signs of this is that the text color of the comment author name that used to have links will be the same as the one that doesn’t.
Method 3: Remove Website URL Field With Code
Another option is to remove the website URL field using a code snippet.
The reason why we want to show you this method is that while the plugin can remove the URL field, it still keeps the “Save my name, email, and website in this browser for the next time I comment” checkbox at the bottom.
To keep things consistent, we want to change this text to “Save my name and email in this browser for the next time I comment.” And we can do that using custom code.
Often, tutorials will tell you to add custom code snippets to your theme’s functions.php file.
However, we don’t recommend this because even a small mistake in your code could cause a number of common WordPress errors or even break your site completely.
That’s why we recommend using WPCode. It is the easiest and safest way to add custom code in WordPress without having to edit any core theme files.
Note: While a free WPCode plugin exists, we will use the premium version for this tutorial.
The first thing you need to do is install and activate the WPCode plugin on your website. For more details, see our step-by-step guide on how to install a WordPress plugin.
Adding Code to Remove the Website URL Field in the Comment Form
Upon activation, go to Code Snippets » Add Snippet.
Then, navigate to the ‘Comments’ tab and find the ‘Disable Comment Form Website URL’ snippet.
If you haven’t connected to the WPCode library yet, then you will now click on the ‘Connect to library to unlock (Free)’ button.
At this stage, simply log in to your WPCode account.
After that, just return to the previous WPCode plugin page. You will now see that the button has changed to ‘Use snippet.’ Click on it to use it.
You will now see the code snippet editor screen with the code to remove the website URL field from the comment form.
All you need to do now is just click on the ‘Inactive’ toggle so that it shows ‘Active’ instead. Then, click on ‘Update’ to make this snippet live.
Now, visitors can no longer add a website URL to their comments.
Adding Code to Remove Existing Links in Comment Author Names
The code from the previous step only removes the website URL field from the comment forms, but existing comments with linked author names will still have links.
Thankfully, you can easily remove them, too, with WPCode. What you need to do is go back to Code Snippets » Add Snippet. Then, click ‘Use snippet’ under ‘Add Your Custom Code (New Snippet).’
Now, you can give this code snippet a name to make it easily identifiable. It can be something simple like ‘Remove Hyperlinks in Comment Author Name.’
After that, change the Code Type to ‘PHP Snippet.’
Once done, copy and paste the following snippet in the Code Preview box:
function wpbeginner_remove_comment_author_link( $return, $author, $comment_ID ) {
// Simply return the comment author without the link
return $author;
}
// Hook the custom function into the 'get_comment_author_link' filter
add_filter( 'get_comment_author_link', 'wpbeginner_remove_comment_author_link', 10, 3 );
Scrolling down, make sure the Insert Method is ‘Auto Insert’ and the Location is ‘Run Everywhere.’
After that, just make the code active and click ‘Save Snippet.’
Now, you will no longer see the older comment author names have links in them.
Adding Code to Replace the Comments Cookies Opt-In Checkbox Text
If you choose to show the comments cookies opt-in checkbox in your comment form, then you will most likely see this checkbox text: “Save my name, email, and website in this browser for the next time I comment.”
Having this checkbox look like this when you no longer have the website URL field will seem pretty awkward. So, it’s a good idea to replace this text.
To do this, just create a new snippet like in the previous step and make the Code Type ‘PHP Snippet.’ You can name this code ‘Replace Comments Cookies Opt-In Checkbox Text.’
After that, copy and paste the code snippet below in the Code Preview box:
// Hook a custom function 'remove_website_from_checkbox_text' into the 'gettext' filter
add_filter('gettext', 'remove_website_from_checkbox_text');
function remove_website_from_checkbox_text($translated_text) {
// Replace the original text with the modified text
$translated_text = str_replace(
'Save my name, email, and website', // Original text to find
'Save my name and email', // Replacement text
$translated_text // The text being processed
);
// Return the modified translated text
return $translated_text;
}
You can make the Insert Method and Location settings the same as before.
Once you do that, just make the code active and click ‘Save Snippet.’
If the code is successful, then you should see the opt-in text changed to “Save my name and email in this browser for the next time I comment.”
Here’s what the opt-in text looks like on our test site:
We hope this article helped you learn how to remove the website URL field from the WordPress comment form. You may also want to see our beginner’s guide on how to moderate comments in WordPress and our expert picks for the best contact form plugins.
If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.
Giri
Thank You.
I have updated, and the field has been removed.
WPBeginner Support
Glad our guide was able to help!
Admin
Anna Mildwater
Hi, this didn’t work for me (adding the code in the functions.php file) to remove the url field. I’m using a child theme for Astra, so i added it to the functions.php for that. Is that correct?
WPBeginner Support
Adding it to your child theme’s functions.php is the correct thing to do. If it didn’t remove it for you, the theme you are using may have its own method for displaying the field where you would want to check with the support for the child theme you are using and they should be able to assist!
Admin
Andres Berejnoi
Thank you for this tutorial. I have been looking for a way to remove that field for a while. It makes the comment section look more crowde, and it is just an extra step for a legitimate commenter. However, is it possible that my site will become slower if I install these kinds of plugins to solve each problem?
So far, I have not noticed the difference, but I have installed only maybe 5 besides the ones that come by default with the theme.
WPBeginner Support
It would depend on the plugin for how it would affect your site’s speed, for our opinion on plugins and how they affect your site you would want to take a look at our article below:
https://wpbeginner.com/opinion/how-many-wordpress-plugins-should-you-install-on-your-site/
Admin
Obaid
What I do is manually approve comments. Might be exhaustive for a large website, but it’s useful for beginners.
WPBeginner Support
Thanks for sharing what works for you
Admin
Arthur Morehead
The plugins have not been updated in 5 years so I’ll just use the code to remove the URL field. I am using Generate Press (child) theme and not sure if I place it before or after the ?>
Laurens
Excellent! I updated the functions file and that now hopefully gets rid of all the spammy comments on my site.
WPBeginner Support
Hopefully, it at least reduces the amount of spam
Admin
Dan
This still works in 2021.
Thanks for the code. That was easy! Glad to be rid of the website URL field for the comments.
WPBeginner Support
Glad our guide was helpful
Admin
Emmeline
Is there any way to block specific URLs from the actual comment content? When I removed the website field and hyperlink ability, it didn’t stop the spammers from just typing their website at the bottom of their comment. The default “disallowed comment keys” feature matches inside words and not just the entire URL, so I can’t block them that way either (they aren’t using distinct keywords). And of course they use a different email address every time, even though I can tell it’s the same person/group. Right now I’m deleting their comments manually, but it’s very annoying because there are so many. Any advice?
WPBeginner Support
For preventing comment spam, you would want to take a look at the recommendations in our guide below:
https://www.wpbeginner.com/beginners-guide/vital-tips-and-tools-to-combat-comment-spam-in-wordpress/
Admin
Seth
Very helpful. Couldn’t leave without saying thank you
WPBeginner Support
Glad our guide was helpful
Admin
Huzaifa Farrukh
First of all, thanks for always sharing useful tutorials like this.❤️
Secondly, I think I probably never had spend my more time on comment section instead of the article itself…
Quite a conversation going on between Syed and “commenters”
WPBeginner Support
Glad you like our tutorials and there likely is some spam that got by in the comment section if that is what you are talking about. Not everyone is perfect in terms of moderating comments.
Admin
Sharon
Thank you for this post among your other informative posts. This was very helpful. I have been receiving spam comments with website links to other websites. It didn’t help that WordPress has default “website” field for those leaving a comment. This helps. Thanks again for writing this article.
WPBeginner Support
You’re welcome, glad our guide was helpful
Admin
José Vicente Santos Aguilar
Finally I founded code that works. Thanks
WPBeginner Support
You’re welcome
Admin
mohit nagar
hello sir,
i use your tutorial to remove website option from comment.
i copy and paste the code in my functions.php but it only website field location change.
WPBeginner Support
You may want to check with your specific theme’s support to see if they could be overriding something on their end.
Admin
Sameer
Thank you Sir it’s very helpful plugin & information As well as
WPBeginner Support
You’re welcome
Admin
malika
Very informative,i liked…….
WPBeginner Support
Glad you liked our article
Admin
James Emmanuel
Thanks for this article, it was helpful… too much spams while comment section of our site was with link. we actually switched to disqus, but disqus java was too much and had some impart on site speed. with your gauide, we are again back to normal.
WPBeginner Support
Glad our guide was helpful
Admin
md somon
Very helpful post, thank you so mutch
WPBeginner Support
You’re welcome, glad our post was helpful
Admin
Rui Nogueira
Yes but is there any way to automatically erase comments that have links ? ( either bots or human typed )
WPBeginner Support
We do not have a recommended method at the moment sadly.
Admin
Dana
Thank you very much!
WPBeginner Support
You’re welcome
Admin
Will Wilson
Is it okay to delete the plugin afterward, or will the website option pop up again in the comment form?
WPBeginner Support
You would need to keep the plugin for it to keep hiding the fields
Admin
Olidur Rahman
Really very helpful thank you!
WPBeginner Support
You’re welcome, glad you found our guide helpful
Admin
hadil
thank you very nice website article
WPBeginner Support
You’re welcome, glad you like our content
Admin
pawan
Your articles always helpful for me,
All content on the website really very helpful
Thanks a lot for sharing such a helpful information
WPBeginner Support
Glad our article was helpful
Admin
Vara Prasad
Hey big fan for wpbeginner website and your code works perfectly for my disktop& mobile website can plz tell my how to remove Website URL Field from Amp pages and post please
WPBeginner Support
This code should work for the url field for comments on those pages as well
Admin
VARA PRASAD
i used code from wpbeginner website which works perfectly for the normal site but Amp pages showing Website URL field i am using newspaper theme
WPBeginner Support
You may want to reach out to your theme’s support to see if they have styling set up that could be overriding the code here
arun mishra
Great articles. i love reading this. Thnx
WPBeginner Support
Glad you enjoy our articles
Admin
JTCAD
Very detailed article. there is more in comments rather than article even.
WPBeginner Support
Glad you found our article helpful
Admin
Miracle Darlington
Well detailed article.. Learnt alot more from comments than the article itself tho.
George Conklin
I came to your website on purpose looking for a way to remove the Website/URL field on comments forms when I cannot use the functions.php method, so obviously I was looking for a plugin to do that. There doesn’t seem to be an up-to-date and reliable plugin that does this unless its baked into the functionality of another plugin. It might be a great idea to update this post just for that purpose – a working plugin
Iqbal Hussain
How to edit “Your email address will not be published. Required fields are marked *” in wordpress comment form?
Tia Mcintosh
Hey i downloaded and activated both and neither did anything to the comments box. I am just trying to get ride of the option for the comment author to put their website in.
Vishal
Hey there everyone, my theme is Twenty-Seventeen and I was able to remove the “Website URL” field from the Comment Section by just adding this single line code to “Additional CSS” section while customizing it through Appearance>Customize. The code is:
.comment-form-url {display:none;}
This might help or give you some idea I hope
WPBeginner Support
Hi Vishal,
It does not remove the comment form url field, it just hides it. Spamming bots will still be able to see and fill it.
Admin
obed
uncheck the ‘required email and website’ options in settings -> discussion on the dashboard
add the following code to your custom css
#respond .comment-form-email, #respond .comment-form-url {
display: none;
}
bill
Thank you, this has worked a bit…
Naeem Hussain
Dear is there any other way to disable website field from my ComputerPakistan Website. Actually I do not want to add any more plugin in my site.
Pravin Singh
Great article and good information. However, both the plugins mentioned have not been updated for many years and could have compatibility issues with latest versions of Wordpress.
Is there an alternative plugin to disable these URLs? If yes, could you kindly update the article as it would be really useful
WPBeginner Support
If you are comfortable adding code to WordPress, then you can try this code in a site-specific plugin or your theme’s functions.php file:
1-click Use in WordPress
Admin
IMRAN KHAN
I have added this code in my themes functions.php and it worked but please can you tell me how to rearrange comments section options.My website shows comments option before name and email but i want to show name and email first and then comment option.
Jazib
Hi guys
I like the article but i have concern here that plugins that you have recommended are two years old and unmaintained. Should i install it or not?
Currently i am using No Captcha service from Google via a plugin.
yellowans
hello guys
very interesting topic helped me a lot. here is my issue I deactivacted name, email and url, from my comments. now my comment section is just that comments, nothing else shows.
however the comment for still shows a space for name email and url, the url box I canceled and is not displaying anymore thanks to a plugin,
my question, which plugin (not really a fan of css) can I use to rid of name and mail on the comment entry form thank you and regards
website theme twenty thriteen
Farhan Shah
I had used a plugin “stop spam comments” for stopping spam comments. but after few week felt that I have reduced website hit on my website. my question is that comments has been stopped but why reduced website hits?
Please tell me should I remove this “Stop Spam Comments” plugin and install this plugin “Disable / Hide Comment URL”?
regards
Ciprian C.
Why not just CSS?
p.comment-form-url {height: 0 !important;overflow: hidden !important;}
not the best solution but it works for me.
WPBeginner Support
It will only make the URL field invisible, spam bots will still be able to use the URL field so it doesn’t serve the purpose.
Admin
Chris Mayell
I can corroborate that CSS changes will not suffice.
I was hoping that a simple display:none trick might work. But the messages keep coming.
I’m going to install the plugin you mentioned now.
Thanks to the author for the good suggestion & helpful article.
hassan Gul
thanx.it’s realy help me out.
Colin Crawford
Perhaps the major search engines should look into this as well. These backlinks are getting out of hand, just like when we added keywords to the meta keywords tag. That was abused and now these backlinks are getting abused.
I use a plugin called Disable Comments throughout some of my websites so no one can leave any. So far it has worked but the other websites receive on a daily basis quite a number. Reading through them, there is many adverts with lots of links, people saying how insightful your website is. For one I do not or have ever heard anyone say insightful so straight into the Spam bin.
I don’t think the amount of backlinks should influence your rankings as they can be too easy to get. I went after a web design job and the owner wanted to do some Off page SEO and wanted the successful applicant to be able to get at least 2000 backlinks for that website. Well I didn’t get the job and glad, probably spend the day leaving insightful comments on other peoples websites.
Editorial Staff
Hey Colin,
Comments definitely encourage conversations like this one here. But yes, spammers are ruining it for the webmasters. Getting rid of the link feature has definitely helped reduce spam comments on the site.
Admin
Damien
Any way to remove the comment url from comments when using Jetpack?
Editorial Staff
If the above plugin doesn’t work, then you would have to dissect the Jetpack code (that’s the only other alternative).
Admin
Jenny
Wondering if you could address a couple of concerns? For the plug-in “Disable / Hide Comment URL”
1. is only compatible to 3.2.1.
2. the last update was 2011-9-2 (really old)
Editorial Staff
If you look at the code of this plugin, it is very simple, and it works. You can take the code and dump it in your functions.php file…
1-click Use in WordPress
So in short, no this plugin is compatible with recent versions. The author just didn’t update the plugin because it simply works. Why update when it is not broken?
Admin
Regev
Awesome!
How do I also…
1. Change the default “Your email address will not be published. Required fields are marked *” into a custom text, like you have done.
2. Remove the * from “Name” and “Email”, and change “Name” to “Your Real Name”
Thanks.
Gautam Doddamani
i guess we already had a long conversation about this a long time back…i think since you got rid of livefyre…yea i agree this helps get rid of spam users and keep legit comments comin’! real nice plugins…wil check ’em out!
Cheers,
Gautam
Shalu Sharma
Nice article and I can understand why people want to remove it but can’t you use the right plugins to moderate and control spam? Thanks for the tutorial, if I do decide to then I know where to look for it.
Cliff Beneventi
Thanks for the article. Reducing or eliminating spam is a critical part of comment management. Akismet does a great job for my clients, but uses URL’s to determine if a comment is spam. This plugin would then render Akismet less effectual. Also, the user can simply insert a URL in the comment itself, can they not? Lastly, I thought that the bulk of spam comments were generated by bots, which would still populate the comment field, even in the absence of a URL field.
Zimbrul
What crosses my mind right now is this “being WPBeginner, o e of the solid sites out there providing quality WordPress tutorials and advice, you can afford to not show the author link on your comment form”. In fact this will dicourage many to comment unless they really have something to say.
I only comment on articles that interest me and never said just “oh, great article, I’ll bookmark it, fantastic piece of writing”.
Elliott Richmond
Agreed, if someone is making the effort to comment on an article the least you can do is credit them with a link! After all it’s about the community right? I noticed this on WPB a while ago and it put me right off commenting full stop! Not that I comment for the backlink because it’s a nofollow anyway but because if any other commenters what to check me out they can.
Zimbrul
Yes, this is the idea of the author website field. But, as I said, I do mot comment here at wpbeginner for backlinks or for make myself known. I use WP Beginner website to get answers and to implement new te tehniques on sites I develop.
I only comment to topics I can “technically” comment, that’s it.
Editorial Staff
Elliot, first of all I’m sorry to hear that you have stopped commenting on WPBeginner just because we decided to get rid of the URL field. While your initial intentions weren’t to get backlinks, but your decision to stop commenting after we get rid of the field only emphasize the point.
If you do not think that a community is worth contributing to just because you are not getting a backlink/promotional value, then I don’t think that you value the community enough.
We have had internal communications about establishing a proper registration system for regular users on WPBeginner. This would allow us to unlock certain perks (i.e backlinks to all of your new and previous comments after you hit comment count marker X). But again, I feel odd because I’m offering incentives for users to comment which is favoring quantity over quality.
I will probably have this added as one of the questions in our annual survey for the WPBeginner audience.
Admin
Elliott Richmond
Not “stop commenting” or “stopped commenting” just “put off” ^_^
On the contrary I do value the community and I hope that I do offer value back to the community (albiet in a very small way compared to others) and I find your tone a little insulting to be honest!
I believe that there are other contributors who I would certainly like to find out more about but seeing as you have denied a link back to their site where I can find out about “the community” it kind of defeats the object wouldn’t you agree? Fortunately I do recognised some of the contributors who I do value, Pippin being one of them but, if I’d like to find out about others then I have no chance right?
Editorial Staff
I won’t argue semantics of stop commenting or “commenting full stop”. Nonetheless, I see your point of finding user’s information and following up with them elsewhere. One thing that can be done perhaps is hyperlink all gravatar images with the user’s gravatar profile? Would you say that is a good solution?
Always love hearing user feedback. This is why I will be adding this in the user survey that we are planning on sending out.
-Syed
Editorial Staff
Zimbrul, first of all, I really appreciate you as a user. I have your gravatar memorized because I know you are one of our regular users. This technique is not to discourage users like yourself because you add relevant and useful conversation to the articles like this comment of yours.
It is also one of the reasons why our site automatically approves your comment But you are among the exception. I can personally tell you that this is a big issue specially if you are running a tech related tutorial blog.
SmashingMagazine has the same thing. They did this long time ago, way before WPBeginner. Reason was the same. I as a user appreciated their decision of getting rid of URLs because then I could engage in meaningful conversations with real people (not those drop by’s who might add controversial comment just to get a backlink and never check back).
-Syed
Admin
Zimbrul
Syed, your kind words means more than a backlink for me, don’t you guys agree? For me the words of appreciation from one of the most respected figures in WordPress community means a lot and as I said I come here not for the backlink but for problem solving most of the time. Sometimes I need advice sometimes I can contribute.
Alan Hughes
Or you could just delete that line of code from the comments.php file.
Umer Rock
Really nice plugin, but can we do this without plugin? Please make a tutorial how we can use plugins without installing or activating, because lots of css & scripts files decrease blog seo.
Pippin
There is literally zero difference in terms of the site performance or maintenance with this being a plugin or coded into your theme. It’s actually much better to be done as a plugin for a variety of reasons.
Editorial Staff
As Pippin explained if you look at the plugin’s code… it really doesn’t make a difference in performance.
Admin
Navjot Singh
Tried the plugin you mentioned but it didn’t work because it relies on the function get_comment_author_link which is no longer used in modern theme’s comment forms. This works though: disable-hide-comment-url.
Adnan Shahid
A very good and useful article, I am also facing this situation on my blog i.e. lot of spam comments. Thanks for writing this article