Automatically Remove Spam Links In Blogger Comments

For established bloggers, it is hectic and quite time consuming process to moderate comments on a blog. Having limited resources on BlogSpot platform doesn’t allow it for detecting the spam comments automatically which makes it manual process for all BlogSpot users. 
For beginners I have previously shared about spam comments and process to remove them. But this way comments may not be easily moderate. Spam comments are always a part of blackhat SEO and hence include the process of link building
Remove Spam Links
Maximum time, whenever you come across spam comments, you would see links at the end or in between which is the sole purpose of spamming. So what if we remove that link from the comment? This way it will not cause the harm it could have been otherwise. 
We can easily do so and in this post I will be sharing the tutorial by which you would be automatically removing spam links from spam comments without any efforts from your side giving you much relief from spams and any moderation process.

How to Automatically Hide Spam Links In Blogger Comments?

What this script actually does is to remove links whenever the user led comments with spam link on your blog.Here are the steps:

  • Blogger Dashboard Click The Drop Down Menu in Your Blog > Choose Template > Then Edit Html > Now Proceed
  • Find the following piece of code in your blogs Html :


  •  Now Copy And Paste This Code Directly Above / Before </body>

<!–Stop Blog Comments –>
<script src=”” type=”text/javascript”></script>
$(‘.comment-content a[rel$=nofollow]’).replaceWith(function(){return ($(this).text());});
<!–Stop Blog Comments–>

All done.

Final words:
Although this script also have a disadvantage that it will remove the links from those comments which has no intention to spam and include necessary links in it. For example it could remove links from your comment in which you had referred a link to reply of somebody’s comments. But this is not that much inconvenience as that of spam links.

I hope next time you would save your time and keep your comments useful and spam free. Any suggestions and queries are always welcome in the comments below.


  1. says

    Hi Isaac, although links will be completely removed but they will be appearing again when you change your template because the JavaScript you had in previous template would not be in your new template anymore.So you need to put code again in your template in order to remove links.