Comment Anti-Spam in Blogger: Mask Links in Comments Automatically
Links in reader comments become masked plain text with a short notice. Spammers get nothing to click, real readers keep talking. Built into Areeb.
Spam comments almost always want one thing: a link back to their site. The Areeb theme takes that reward away. When a reader's comment contains a link, the theme shows the comment as plain text, hides most of the address with stars and adds a short notice that links aren't allowed. Real readers can still talk, and spammers get nothing to click. It works on its own; there is nothing to set up.
What readers see
| The reader wrote | The comment shows |
|---|---|
areebsoft.com | are****.com |
visit https://bestdeal.com/offer?id=7 now | visit bes****.com now |
www.cheap-deals.pk please | che****.pk please |
| A clickable link | Its address, masked, as plain text |
Great post, thanks! | Unchanged |
Under every masked comment a small red line explains why:
Links are not allowed in comments, so this one was hidden.
- Only the first three letters and the ending (
.com,.pk…) stay visible. - The path after the domain is removed, so tracking codes and offer pages never show.
- Nothing in the comment can be clicked.
What counts as a link
- Clickable links added with HTML.
- Full addresses starting with
http://,https://orwww.. - Bare domains typed as text, such as
bestdeal.com. Common endings are covered: .com, .net, .org, .info, .io, .co, .me, .xyz, .top, .site, .online, .shop, .store, .link, .click, .live, .app and several country endings.
Normal writing is safe. "e.g.", "Works. Thanks" or "blogspot" on its own are not treated as links.
Your own comments
Comments written by the author of the post are never changed. You can reply with a link to another guide and it stays exactly as you wrote it.
Why mask instead of hide
- Real readers keep their voice. Someone who mentions a site by accident still gets their question answered.
- Replies stay in place. A thread doesn't break because the first comment had a link.
- Spammers get nothing. No click, no visit, no ranking boost, and the notice tells everyone why.
Stop spam before it is published
Masking happens in the reader's browser. The comment itself is still stored in Blogger as it was written. To keep spam off your blog completely, combine the theme with Blogger's own tools:
- Turn on moderationIn Blogger, go to Settings › Comments › Comment moderation and choose Always. New comments wait for your approval.
- Limit who can commentIn the same section, set Who can comment? to Users with Google Accounts. Anonymous spam drops sharply.
- Clean upOpen Comments in the Blogger menu, select the spam and click Spam or Remove.
Blogger also adds nofollow to links in comments, so even if one slipped through, it would pass no SEO value.
Change the notice text
The notice comes from the theme's text file. Open Theme › Edit HTML, search for comments.linkHidden and change the sentence between the quotes.
"comments.linkHidden": "Links are not allowed in comments, so this one was hidden."
Keep the quotes and the comma at the end of the line, or the theme's scripts will stop working.
Quick reference
| Question | Answer |
|---|---|
| Do I need to switch it on? | No, it always works |
| Are links clickable? | No, plain text only |
| How much of the link shows? | 3 letters + **** + ending |
| Are my own comments changed? | No |
| Is the comment deleted? | No, delete or moderate it in Blogger |
| Change the notice | Edit HTML › comments.linkHidden |
Questions
Can I turn link masking off?
It is built into the comments script and always on, because links in comments are almost never useful for a blog's readers. If you need to share a link, write it yourself as the post author.
Does Google still see the link?
The link stays in Blogger's comment feed, but Blogger marks comment links as nofollow, so they pass no ranking value. Delete the comment in Blogger to remove it completely.
A reader wrote a normal word and it got masked. Why?
Words glued to a dot and an ending, like word.com or it.in, look exactly like a domain. Adding a space after the dot avoids it.
Does this slow down the comments?
No. Comments load only when the reader opens them, and the check is a single text match per comment.
Does it work on replies too?
Yes. Every comment and every reply is checked on its own.

Written by
mu abdullah
Comments 0