Forms and comments are flooded by robots, besides the captcha, what else can be done to add several layers?

📅 October 12, 2026 👁️ 14

The form and comment sections are flooded with spam, and in addition to captcha, the layered protection that can be implemented is: submission verification, content filtering, and publishing strategy in three layers. The captcha solves the problem of whether a human is clicking, but it cannot prevent submissions that have bypassed the verification through captcha-breaking or scripts, nor can it prevent low-cost manual batch registration. The truly stable approach is to let each external submission pass through several different judgments, with each one responsible for only one thing, and failure of any one of them does not allow garbage to directly enter the text.

The first layer: submission verification

The reCAPTCHA captcha is the core of this layer. After the form is connected, the server validates the ticket, and the site does not need to judge whether it is human or machine. It can be hung on the front-end form and message interface. Its limitations are also very clear: tickets can be刷代, and submissions that are abnormal but pass the verification will still come in; in addition, the captcha has an impact on the transformation of the mobile terminal, and it is not appropriate to enable it without distinction throughout the site.

Two low-cost methods can be stacked at the same level: one is a honeytrap field, placing a field invisible to humans and often filled by scripts in the form, and discarding the submission once there is a value; the other is the submission time window, which is deemed suspicious when the time from page loading to submission is shorter than the reasonable value for humans. They do not affect normal users and are suitable as supplementary judgments in addition to captcha.

Second layer: content filtering

After entering, first judge the content itself. The sensitive word filtering is responsible for intercepting obvious违规 words, after hitting, you can choose to reject or replace; keyword replacement is suitable for dealing with the scene of 'content is available but the words are not standard', so as not to discard the whole thing. Content review then transfers the judgment to a person: suspicious files enter the pending review queue, and normal files are directly published.

The value of this level lies in the fact that it does not depend on 'who the submitter is', but only on the content. The limitation is that the rules can be bypassed by variants, homophones, split characters, and it is common to put links into images, so the rules need to be continuously supplemented, rather than not moving after being configured once when launched.

Content filtering has an additional layer related to display: After external content is submitted and enters the main text, it must be output escaped; otherwise, the script code in the comments will be executed in other readers' browsers, which is the source of XSS risk. Similarly, any user input concatenated into the query path should be parameterized to avoid injection. Anti-crawling interference codes belong to another direction of protection, aimed at the bulk copying of content, which is not the same as anti-inflation. Do not mix them when configuring.

Third layer: Publishing strategy

The first two layers judge whether to accept, the third layer decides when it is visible to the public. Means include: Pre-review and release (new comments enter the pending review status and are confirmed by humans before being released), scheduled release (batch content is released at staggered times, with an observation window for anomalies), login threshold (only registered users are allowed to submit), and frequency limitation based on user and source address.

Draft status is very useful here: it allows content to be entered first, then checked individually, and only converted to formal after verifying the preview link. The same status mechanism also allows for the recovery of accidental deletions - deleting formal documents moves them to the recycle bin instead of a physical deletion, so normal content is not lost when garbage is processed.

Level Means What is blocked What cannot be blocked
Submit verification reCAPTCHA captcha, honey pot, time window Direct script submission Proxy, manual batch
Content Filtering Sensitive word filtering, keyword replacement, content review Obvious violation text Variation writing, links within images
Release strategy Pre-screen and release, limit frequency, login threshold Large-scale concentrated injection Small amounts disguised as normal content

What to change when all three layers cannot block it

First, check if the 'entry' is too wide. The same form appears repeatedly on multiple pages without content context validation, and it will be continuously scanned by scripts; closing unnecessary entries is more convenient than adding more complex validations to each entry.

Then look at the account side. When the cost of registering water accounts is low, any content rule will be exhausted; at this point, it should increase the registration threshold, such as requiring email verification or manual confirmation for the first submission.

Finally, look at the response loop. Anti-spam is not just about setting up rules once, but relies on the cycle of 'leakage occurs - supplement rules - verification takes effect' to run, and email reminders can notify people of the situation of the backlog in the pending queue, avoiding the rules being updated slower than the speed of change on the other side.

Common questions

Question: Is it enough to only use captcha?Answer: Not enough. Captcha only blocks automatic submission, and proxies and manual batch processing will bypass it, and it is necessary to add content judgment and publishing strategy.

Question: Will it affect the interactive experience if all content is reviewed before it is published?Answer: It can be categorized by source: logged-in old users can publish directly, new accounts or submissions containing links go into the pending queue, balancing experience and risk.

Ask: Should the filtering rules distinguish between languages?Answer: Yes. If the keyword rules of a multilingual site only cover the main language, comments in other languages will remain in an unguarded state for a long time.

Related articles

How to fill in the last modified time in the sitemap so that it is easy to be accepted.

The last modified time in the sitemap should be filled in according to the actual change: the protocol requires the use of W3C Datetime format, which can only be written as a date; changefreq and priority are defined as hints rather than instructions, and full-site refresh will only make the crawler treat this field as noise. This article explains the protocol meaning of this field, the four common ways it is filled incorrectly, how to obtain the real change time from the content status, and the time scope to be noted when配合 with timed publishing.

2026-10-12

How many addresses can a single sitemap file hold, and how should it be split if it exceeds the limit?

The single sitemap file has two concurrent limits: the number of addresses should not exceed 50,000, the uncompressed volume should not exceed 50MB, and any that reach the top must be split into multiple fragment files, and then a index file is used to list the fragments one by one. This article explains how to calculate the limit according to the original protocol, how to name the fragment directory stably, the division of labor between the index file and the sub-maps, as well as the pseudo-static rules and configuration to check when the background automatically generates the sitemap, to avoid bypassing the limit by trimming the number of addresses in an erroneous manner.

2026-10-12

Add integrity verification to external scripts, why do you still need to explicitly write cross-domain attributes in the tag?

When adding integrity check to external scripts, the cross-domain attribute must be explicitly written in the tag, because resources with integrity check must go through cross-domain requests, otherwise the browser will not consider the check result as available. The check value consists of an algorithm prefix plus an encoded hash, and multiple summary alternatives can be provided at the same time. This article explains where the check occurs, the format and alternatives, as well as how to batch verify reference points after template changes.

2026-10-11

Content security policy reports first and does not block, deciding to really block after seeing what happens

Content Security Policy runs in only-report mode first, used to collect violation records without blocking execution, which is a gray-scale method before going live with intercept rules. There are two ways to write the report target, new browsers will ignore the old address, and both should be written during the compatibility period. This article explains what types of information to look at during the gray period, when to cut off the intercept, and how to avoid a blank screen when changing the template.

2026-10-11

Whether to install the preview version on the production station, and how to choose between Release Candidate and formal version

The candidate version is at the final stage of the release process, the purpose is to let people verify the upcoming packaged final version, not the version for daily use on production stations. This article uses the recent example of Joomla simultaneously releasing 6.2 candidate version and 5.x, 6.x dual branch security repair announcements to explain where the candidate version should run, which branch to upgrade first when running dual version lines in parallel, and the backup and rollback points that must be prepared before the upgrade.

2026-10-12

When scheduling content and batch importing at the same time, what should be paid attention to in content scheduling?

Scheduled release and batch import together, the key to scheduling is in state division: the documents imported in batch are first stored as draft or pending release, and then released peak-time with scheduled release. This article explains the meaning of each of the four document states: formal, draft, pending release, and recycling bin, how to verify the draft link with preview parameters, the troubleshooting sequence of missing fields in import, and how to recover deleted content through the recycling bin.

2026-10-12

How to write the rollback target instruction in order when static files fall onto the Web server?

When the static rules fall to the Web server, the instruction responsible for finding files in order is often written incorrectly for the fallback target. Its semantics is to check the existence of files in the given order, using the first matching file to handle the request in the current context; only if all do not exist is an internal redirection made to the last parameter. This article explains two syntax forms, the slash convention for directory judgment, and the common mistakes when falling back to the back-end entry.

2026-10-12

After container deployment, who follows up on the Web server patch in the base image?

After container deployment, the patch of the Web server brought by the base image is still followed up by the site operator, and the responsibility will not shift because the image is built by someone else. It should be divided into three layers: application layer, image layer, and reverse proxy layer, with different repair versions and update rhythms at each layer. This article provides the division of responsibilities for the three layers, why an unchanged image tag is equal to no upgrade, and the operation sequence of rebuild and grayscale.

2026-10-12