How to Automatically Remove Spam links from Blogger Comments

Fighting against comment spam is among the most frustrating job for a blogger, especially when you don’t have enough money to hire a comment moderator that trashes the spam comments while publishing all the useful comments to your blog. Obviously you don’t want to delete your all comments just for the sake of few spam ones? Since, Blogger doesn’t have a real-time comment spam detection plugin the reason why we have to implement some techniques to make sure that spam comments are staying away from our blogger site. Today, in this article, we will show you How to Automatically Remove Spam links from Blogger Comments.

Method # 1: Use CSS to Remove Spam Links From comments: 

These days search engines are smart and they know what you are referring is useful and what they should ignore. By removing spam links from comments with the help of CSS could not only hide those links but would stop search engines from indexing them too. So go to Blogger >> Template >> Edit HTML >> Search for Skin tag and just above it paste the following piece of code:

.comment-content a {
display: none;

Method #2: Use jQuery To Remove Links:

Some people might not recommend the above process they might argue that the spam link is still there, because we have just hide it with the help of a simple display:none; CSS. So go to Blogger >> Template >> Edit HTML >> Search for starting <body> tag and just below it paste the following piece of JavaScript code:

<!--Stop Blog Comments -->
<script>$('.comment-content a[rel$=nofollow]').replaceWith(function(){return ($(this).text());});
<!--Stop Blog Comments -->

Once everything is done, Save the template and now you can sleep with worrying about comment spam. Whenever, a user will leave a link into his comments the link will be considered as spam and he the script will automatically remove it within seconds.

We hope this short tutorial may help you in tackling comment spam from your blogger blog to a certain extent. We would recommend you to also use comment moderation feature that would also be a useful thing to be done to take care spam.

How To Write Effective Comment Policy For Your Blog
Disable (Name/Url) Option in Blogger Comment Form


The Editorial Team of MyBloggerLab consists of a group of Professional Blogger geeks Led by Syed Faizan Ali (Founder of MyBloggerLab).

Comment With:
Choose Wisely!


May 13, 2014 at 12:30 AM

hi nice piece of information you have. how do i locate starting body tag

May 13, 2014 at 3:07 AM

You missed the opening script tag. :)

May 13, 2014 at 9:14 AM

Wow BrO Really So Nice Of you :)
Thanks For Sharing :)
It Will Help Me So Much :)

May 13, 2014 at 7:50 PM

Thank You for another interesting post!

January 27, 2016 at 10:23 AM

you are using this trick?

April 25, 2016 at 2:27 PM

Do these methods hide/remove ALL links, or just those that are considered spam?

May 31, 2016 at 3:30 PM

It will hide all links. I mean ALL links.

August 4, 2017 at 7:06 AM

nice post tnx for share :)

Post a Comment

We’re eager to see your comment. However, Please Keep in mind that all comments are moderated manually by our human reviewers according to our comment policy, and all the links are nofollow. Using Keywords in the name field area is forbidden. Let’s enjoy a personal and evocative conversation.

Helping You to do Cool Things With Blogger Since 2012™.

© Copyright 2012 - 2018. MBL Networks, All Rights are Strictly Reserved.