Remove Spam Link in Blogger Comment Section Using JQuery

Would you like to know how you can easily stop spam comments on your blog without going through stress? Then this post will definitely help you solve that problem.

Last time, we talked about how to easily stop spammy links in our blogger blog comment section with just a simple CSS code. So today, we are going to see if we can stop spam comments using JQuery…

You know, the one thing I hate about these types of comments is, you can’t edit them. If the comment is interesting but has enough links in it, you just have to delete the comment or accept your fate and approve the comment.

But with a simple trick, you can easily remove the links these spammers are posting inside their comments.

So are you ready to learn how to? If your answer is yes, let’s go right to it, shall we!

How to Remove Spam Link in Comment Section Using Jquery

Before we go ahead, do note that this post is working 100% fine. I have tested it on my blogger blog before publishing it here.

First, go to your blogger dashboard >>> click “Template” to take you to your template area.

remove spam comment automatically

Click “Edit HTML” to take you to your HTML Editor’s area… in this place, we are going to do some code editing…

Don’t worry, I promise to make it as easy as possible 🙂

Search for the </body> tag. Have you seen it?

Note: To make the search easy, click inside the editor’s box >>> and press ctrl + f simultaneously. Doing so, a search box will appear. Now search for the code.

You must have seen the code by now, right? If yes, copy the below code…

[code] <!–Stop Blog Comments –>


$(‘.comment-content a[rel$=nofollow]’).replaceWith(function(){return ($(this).text());});


<!–Stop Blog Comments –> [/code]

Have you copied the above codes?

Now paste the code right above the </body> tag.

Have you done that? Now simply click the “Save Template” button and you are done with the code implementation.

Now you can feel safe without worrying about those pesky spammers.

If you are finding it difficult to implement the code, do let me know using the comment box below and I will guide you through ASAP.

Let’s talk

Do you have comments, questions, and thoughts you’d love to share with us? Do use the comment box below to do so. Remember that your comments, questions, and thoughts are highly welcome and most appreciated.

Be social

Was the post helpful enough? Do share the post with friends on your social media. Believe you me, they might find the post very useful as well.

Before you leave, do not forget to subscribe to our feed for your latest updates on the go.

Similar Posts


  1. Hi Babanature,

    Informative indeed 🙂

    As I always say, I wish I’d known your blog when I was on the Blogger platform for the wonderful tutorials you share! However, I am glad we can edit the links in WP though or remove them completely also – especially if we moderate the comments, as we do at our blog. Not heard of JQuery- so good to know of it too.

    Thanks for sharing. Have a nice week ahead 🙂

    1. Hello Harleena,

      Indeed, WordPress made editing comment easy. We can help correct or edit a commenter comment on the WordPress platform… doing so on blogger platform is impossible.

      Google team needs to fix that, because since it’s our blog, we are supposed to have all the feature we need to run it smoothly 🙂

      Thanks for stopping by and dropping your comment as usual.

      Do have a beautiful week ahead…

  2. Hello Babanature,

    You should be gien the title of blog professor seriously. You do know how to help blogger achieve their dream.

    Thanks for the tutorial.

  3. Hi Babanature,

    Though I never build a serious blogging project with blogger but this your tutorial on removing spam comment really grab my attention.

    I just want to see how it’s done without the need of plugins as we do on WP, I might need to come back to this page if I for one day build a business online using blogger blogging platform.

    Thanks for sharing your knowledge with us.

    1. Hello Shamsudeen,

      Building a blog on the blogger platform for business is also an awesome idea, as long as you know what you’re doing 😉

      Thanks for stopping by and dropping your comment on this… Do have a wonderful week ahead…

  4. Well its been a while since I have used blogger platform as I moved all blogs to wordpress. This tutorial is really useful.

    Thanks for sharing.

  5. The main reason why most bloggers get banned is not mostly there fault it might be as a result of spam comment which google dislike and you might be thinking commenting with your site url brings backlinks yes it does but when it becomes much it is been counted a harm to the site you place them.

Leave a Reply

Your email address will not be published. Required fields are marked *