How to Hide Links In Blogger Comments

min
() Words
Share
Share
Tweet
Share
Share
Share
Pin it

Blog spam and comment spam usually occurs when a bot or an actual human visits a forum, a blog, or chat room and post self-promotional links intentionally on your posts to spam your blogs. You can also permanently block a visitor commenting on your blog posts but doing so is a silly idea, and this will drive off some legit visitors that want to comment as well.

Hide Active Links In Blogger Comments

Check out: How to Block Someone Commenting on Your BlogSpot Blog

Spammers usually type anything like, Hey, love this article, Wow excellent article, I was looking for the same post, and so on then they just fill up the comment thread form with promotional links that are considered to be infectious links.

When it comes to SEO or search engine ranking, both spam links and spam comments are very harmful to our blog reputation. Blogger has taken the many security measures to prevent the blogs from spammers, but it is up to you how you deal with the excellent features provided by the BlogSpot.

How Does Anti-Spam URL Filter Work?

As soon as you install the plugin, it will automatically remove the links from your comments upon the spam URL detection. Every current URL will be quickly replaced with a custom and unclickable message. Kindly note this plugin will also remove the links that you have inserted in your comments by yourself. By changing a small piece of code, you can even hide the author/commentator profile URL in comments.

There are some ways to get rid of these pesky spam comments. Installing the jQuery Anti-Spam URL filter is a great way to hide or remove the active links from your comments.

This time i am going to share how to hide active links on Blogger comments to prevent spammers from deliberately inserting the unsolicited links to our blog articles, and this is indeed a handy tutorial.

To Hide or Remove the Links In BlogSpot Comments, kindly Follow the Steps:

  1. First, log in to your Blogger account and backup your theme
  2. Secondly, navigate to Theme > Edit HTML
  3. Press Ctrl + F and a search box will appear within the theme editor
  4. Type the </body> in the recently appeared search bar and hit Enter key
  5. Add the given jQuery code and press Save theme button
  6. <script type='text/javascript'>
    //<![CDATA[
    //Block Link Comments
    function blockLinks(parentID, children) {
    var parent = document.getElementById(parentID),
    content = parent.getElementsByTagName(children);
    for(var i = 0; i < content.length; i++) {
    if(content[i].innerHTML.indexOf('</a>') !== -1) {
    content[i].innerHTML = "Spammer Detected!";
    content[i].className = "spammer-detected";
    }
    }
    }
    blockLinks('comment-holder', 'p');
    //]]>
    </script>

    Note: Due to the variation in theme code, in most cases, the above piece of code may not work for your Blogger template. In this situation, add the following code instead of the code mentioned above.

    <script type='text/javascript'>
    //<![CDATA[
    //Block Link Comments
    function blockLinks(parentID, children) {
    var parent = document.getElementById(parentID),
    content = parent.getElementsByTagName(children);
    for(var i = 0; i < content.length; i++) {
    if(content[i].innerHTML.indexOf('</a>') !== -1) {
    content[i].innerHTML = "Spammer Detected!";
    content[i].className = "spammer-detected";
    }
    }
    }
    blockLinks('cm_block', 'p');
    //]]>
    </script>
  7. To give a stylish look to the spam URL detection, add the CSS code right above the ]]></b:skin> or </style>
  8. p.spammer-detected {
    background: #9eb2c0;
    position: relative;
    display: table;
    margin: 10px 0;
    padding: 5px;
    color: #fff;
    font-size: 85%;
    border-radius: 2px;
    }
  9. Finally, save your changes and you are on the go.

If you need further help regarding this tutorial, please do not hesitate to leave your valuable comments.

Discover How to Gain Your Blog Traffic By 209%

Get Free Access

Recommended For You

5 comments:

  1. Sultan Editing lovers10 November 2017 at 08:49

    This comment has been removed by the author.

    ReplyDelete
  2. Hello Brother..Blogspot blog site par comment karke us site se backlinks kaise milta hai. Jaise mere blog per aapne comment kiya to agar me aapke nam par click karu to reader aapke blog per chala atha hai

    ReplyDelete
    Replies
    1. It completely depends the comment privacy of the blogs where you leave your feedbacks

      Delete
  3. I am not understand

    ReplyDelete
    Replies
    1. Every Time you get backlinks when you comment on other sites

      Delete