The server defaults to writing the program version into the response header and error page. Should this level of fingerprint be removed?

📅 October 12, 2026 👁️ 22

The web server defaults to writing the program version into the response headers and error pages. Whether to remove this fingerprint, it is first necessary to clarify where the version number is leaking from.For example, with Nginx, the directive that handles this is server_tokens, the value can be written as on or off, or can be specified as build or a custom string, the default value is server_tokens on, and the scope covers the http, server, and location three configuration levels.The document states that it controls whether the program version is output in the error page and Server response header fields, turned off, these two places no longer contain version information.

From where are the version numbers leaking out

The nature of the two leak points is different. The former is the response header: when the request comes in, the Server field goes back with the response, and it is also included in the normal page without any trigger conditions. The latter is the error page: only when the request hits a non-existent resource, there is a problem with the path configuration, or an error response generated directly by the server software is triggered, the version number will be written into the return text. It is because a single instruction controls two exits that it is easy to miss the path of the error page if only the response header is checked.

What information remains after turning it off?

Turn off server_tokens, what is reduced is the version string itself, not the entire fingerprint. The Server response header field still exists, but the content is shorter, and it can still be seen which server software it is;The default layout of the error page, the existence form of the default test page, and the differences in responses to malformed requests are still present. Sometimes, one can even infer the approximate version range from the response structure.So the purpose of this layer is to reduce information exposure, making it less convenient for people to accurately compare by version number, rather than a defense line. What truly determines the risk is something else: keep the running version updated to a version without known issues, close unnecessary entries, and configure services with the minimum exposure.

What can this fingerprint help the attacker?

Obtaining the accurate version number is mainly convenient. Attackers can skip the trial and compare item by item on the list of known issues; they can narrow down the target to specific behaviors unique to a version range; they can prioritize suspicious sites during batch scanning. Conversely, when the version information is unclear, they either spend more requests to deduce it or switch to general means. This is friction on the probability level, not a refusal of access. Taking it as a sign that the reinforcement has been completed is a misreading; this switch reduces the efficiency of precise matching, but does not change whether there is a problem with the site itself.

What else needs to be done outside of the switch?

This switch needs to be configured on the specific layer that is responsible for external services. There are three paths for on-site deployment: through Baota panel deployment, through Docker image deployment, or by command line, and the positions changed by the three methods are not the same.The site deployed by Baota panel, pay attention to whether the configuration template generated by the panel covers the handwritten content; For Docker image deployment, put the configuration in the image building phase or mount the configuration file to avoid losing changes after the container is rebuilt.Deploy directly editing the corresponding scope via the command line. The program listens by default on port 8001, and if this port is accessible from outside, the port exposure range and server configuration need to be handled together. Simply receiving fingerprints without considering the entry point is not enough.

Common misunderstandings

A misunderstanding is taking the custom string as completely hidden. It can change the displayed text, but the response header field still exists; build has the opposite direction, the documentation notes that it has been supported since 1.11.10, meaning that the build name is output together, which is more exposure rather than more hidden. A second misunderstanding is thinking that changing one place will fix everything: the scope of the command covers http, server, and location three layers, and when there is no explicit entry in the site configuration, it will be taken over by the upper-level settings. A third misunderstanding is treating it as a bonus item on the list, but ignoring version updates and entry management.

Common questions

Ask: Will the Server response header disappear after turning off?

Answer: No. This command controls whether to output the program version. The field itself still exists, but the content is shorter. It is hoped that the field does not appear at all, and special response header processing needs to be done at the level of providing external services.

Ask: Since it has been turned off, do we need to pay attention to version updates?

Answer: No. The reduction in mouthpiece is just to reduce information exposure. Whether there are known problems depends on the version of the actual running. Continuing to update, closing unnecessary entries, and configuring the minimum exposure area are the real parts that affect the risk.

Ask: Where should the Baota, Docker, and command line deployment be changed?

The answer is: They should all be changed to the layer that is responsible for providing the service to the outside. Write and confirm the template in the Baota panel's site configuration to prevent it from being overwritten; write Docker images into the build content or mount configuration to prevent them from becoming invalid after reconstruction; after changing the configuration in the command line mode, reload the corresponding scope configuration. After changing, send a request and check whether the version information is still present in the response header and error page.

Related articles

When your own image is directly referenced by other websites, which response header decides whether to allow or not.

When your own image is directly referenced by other websites, it is the resource party that decides whether to allow it, not the referencing party. The Cross-Origin-Resource-Policy response header is set by the referenced resource, indicating which sources can load it, with values divided into three levels: same-origin, same-site, and cross-origin. The default is to block cross-site requests without cors. This article discusses which level each tier allows, whether it is on the same end as the initiating party, and whether images and fonts should be released separately.

2026-10-12

Why does the server prefer to return an early status code when it receives a request before the connection is fully established?

The early data of TLS allows the client to send the request in the first round trip, saving the next handshake wait time, at the cost of this type of request being at risk of replay. 425 Too Early indicates that the server is unwilling to take the risk of processing a potentially replayed request and prefers to reject first. This article discusses what the early data saves, where the risk falls on what type of request, why idempotent and non-idempotent need to be treated separately, and what trade-offs a service with Go as the technology stack needs to make at this level.

2026-10-12

When the content does not change, the server only returns a status code, and conditional requests rely on which identifier to judge.

The cache expiration does not mean that you need to download the entire content again. ETag is the identifier of a version of the resource, and a new value must be generated when the resource content changes; the client uses If-None-Match to return the old value during a revisit, and if the server compares it and finds it consistent, it will only return a status code without the body. This article talks about what this identifier represents, the difference between strong verification and weak verification, why the weak identifier can affect segmented requests, and how sites with frequently changing content can use it to reduce duplicate transmission.

2026-10-12

The browser will mark whether the request is from this site or an external site, and how the server can prevent cross-site requests based on this.

The browser adds several Sec-Fetch request headers that indicate the source relationship, which frontend scripts cannot change. The values distinguish between same-origin, same-site, cross-site, and no-origin, and the server decides whether to allow or deny based on these relationships, thereby providing a complementary defense against cross-site request forgery; these headers are only sent in requests from trusted addresses. This article discusses the meanings of the four values, the way to allow based on context, and what they each manage in round-level operation approval.

2026-10-12

Would adjusting the page layout make it easier for the generative engine to refer to it, and the experiment provides two percentages?

A generative engine optimization study decomposes the content structure into three layers: document architecture, information blocks, and visual emphasis, and conducts experiments on six mainstream generative engines. The report shows a 17.3% increase in citation rate and a 18.5% increase in subjective quality, without changing the main theme content. This article explains what these two percentages refer to, why structural improvement does not equal content quality improvement, and its division of labor with automatic site generation such as llms.txt.

2026-10-12

Is the site description file for the large model meant for humans or for agents, the proposal has changed the statement.

This site description file, according to the current proposal, is to help agents use the website, while the early expression is to help the language model understand the web page, and the service object has expanded from the model to the agent. The file is a plain text list, and only one item is required in the specifications: a first-level title with a project or site name, the rest of the abstract sections, descriptive sections, and file lists grouped by secondary titles are optional. AnQiCMS supports automatic generation of site llms.txt and is different from the site map.

2026-10-12

When the Robots file itself is unreadable, what rules does the crawling party follow?

The original agreement divides the failure to read into two opposite results: when the response status code falls within the five hundred to five hundred and ninety-nine segment of server errors, the crawling party must consider it as completely prohibited; when it falls within the four hundred to four hundred and ninety-nine segment of client errors, the crawling party can access any resource on the server. The agreement also states that these rules are not access authorization and cannot replace content security measures; the background of the station and the user group permissions are the real door.

2026-10-12

There is a measurement that says the scraping scripts only follow a part of the exclusion rules, where is the difference in the ratio

A measurement covering thirty-six institutional sites, forty days of traffic, and about one hundred and thirty self-reported identity scraping scripts shows that the compliance rate varies greatly by instruction type: about 60.9% for scraping frequency instructions, about 31% for precise path prohibition, and about 30.7% for whole section prohibition; and less than four in ten scripts will re-read the exclusion file within one hundred and sixty-eight hours. These numbers indicate that relying solely on the exclusion file is not sufficient, and there must also be anti-crawling and permission layers within the site.

2026-10-12