Apache signatures are server-generated strings that identify the software version, operating system, and details of an Apache HTTP Server installation. These signatures typically appear in the footer of server-produced documents, such as 404 error pages or directory listings, and within the "Server" field of HTTP response headers.
In the landscape of web administration as of 2026, managing these signatures remains a fundamental step in server hardening. While they provide useful debugging information for developers, they also offer a roadmap for potential attackers. By understanding the distinction between ServerSignature and ServerTokens, administrators can effectively balance operational transparency with robust security protocols.
Defining the Apache Server Signature Components
When discussing Apache signatures, we are actually referring to two distinct but related directives within the Apache configuration. It is essential to distinguish between the visual footer seen by end-users and the metadata transmitted in the background.
What is ServerSignature?
The ServerSignature directive controls a line of text that the server places at the bottom of server-generated documents. These documents include error messages (like 403 Forbidden or 500 Internal Server Error) and index listings generated by mod_autoindex.
By default, this signature often includes the Apache version number, the server's hostname, and the port number through which the request was served. In a standard installation, it might look like:Apache/2.4.62 (Ubuntu) Server at www.example.com Port 443
What is ServerTokens?
While ServerSignature affects the visible body of an HTML page, ServerTokens controls the "Server" HTTP response header. This header is sent with every single request, regardless of whether it results in an error or a successful page load.
Tools like curl, browser developer consoles, and automated vulnerability scanners read this header to determine what technology stack a website is using. Depending on the setting, this can reveal everything from the specific patch version of Apache to the exact operating system and installed modules (like OpenSSL or PHP).
The Security Implications of Information Disclosure
The primary reason administrators seek to explain and manage Apache signatures is security. In the field of cybersecurity, "Information Disclosure" is a recognized vulnerability where a system provides more data than is necessary for a transaction.
Facilitating Reconnaissance
The first stage of most sophisticated cyberattacks is reconnaissance. An attacker will scan a target to identify the specific software versions running. If an Apache signature reveals that a server is running an outdated version—for example, a version with a known CVE (Common Vulnerabilities and Exposures) related to a buffer overflow—the attacker can tailor their exploit specifically to that weakness.
By suppressing these signatures, you force an attacker to use "blind" or "black-box" testing. This increases the noise they make on the network, making it more likely that your Intrusion Detection System (IDS) or Web Application Firewall (WAF) will flag their activity.
Compliance and Audits
Modern security standards, including PCI DSS (Payment Card Industry Data Security Standard) and various SOC2 frameworks, frequently require the minimization of software fingerprinting. Security auditors often flag verbose server headers as a medium-risk finding. As of 2026, the consensus remains that "Security through Obscurity" is not a primary defense, but it is a vital layer in a "Defense in Depth" strategy.
Detailed Configuration Options for ServerTokens
The ServerTokens directive is the most powerful tool for controlling the density of information your server broadcasts. It accepts several arguments, ranging from highly verbose to extremely minimalist.
| Directive Value | Example Header Output | Level of Detail |
|---|---|---|
| Full | Server: Apache/2.4.62 (Unix) PHP/8.3.4 OpenSSL/3.0.13 |
Maximum: Shows version, OS, and modules. |
| OS | Server: Apache/2.4.62 (Unix) |
High: Shows version and operating system. |
| Min (Minimal) | Server: Apache/2.4.62 |
Medium: Shows version numbers only. |
| Minor | Server: Apache/2.4 |
Low: Shows only the major and minor version. |
| Major | Server: Apache/2 |
Minimal: Shows only the major version. |
| Prod (ProductOnly) | Server: Apache |
Recommended: Shows only the software name. |
In almost all production environments, ProductOnly (or Prod) is the recommended setting. It satisfies the HTTP protocol requirement of identifying the server software without providing any actionable data to an external observer.
How to Configure Apache Signatures and Tokens
Modifying these settings requires access to the server's main configuration files. Because Apache's file structure varies by operating system, you must first identify your environment.
1. Locate the Configuration File
- Ubuntu/Debian: The settings are typically found in
/etc/apache2/conf-enabled/security.confor the main/etc/apache2/apache2.conf. - RHEL/CentOS/Fedora: Look in
/etc/httpd/conf/httpd.conf. - Generic/Manual Installs: Check the
confdirectory within your Apache installation path.
2. Modify the Directives
Open the file with a text editor (such as nano or vi) using root or sudo privileges. Locate the following lines. If they do not exist, you can add them to the bottom of the file or within the or VirtualHost blocks where you want them to apply.
To hide the visible footer on error pages:
ServerSignature Off
To minimize the HTTP header information:
ServerTokens Prod
3. Verify and Restart
Before applying the changes, always test the configuration for syntax errors. In 2026, the standard command remains:
apachectl configtest or apache2ctl configtest
If you receive a "Syntax OK" message, restart or reload the Apache service:
sudo systemctl restart apache2 (on Debian-based systems)
sudo systemctl restart httpd (on RHEL-based systems)
Using .htaccess for Signature Control
One common question is whether ServerSignature and ServerTokens can be managed within a .htaccess file.
- ServerSignature: This can generally be controlled in
.htaccessif theAllowOverride AllorAllowOverride Configdirective is set for that directory in the main server configuration. This is useful for shared hosting environments where users don't have access to the globalhttpd.conf. - ServerTokens: This directive is Global only. It cannot be changed within a
.htaccessfile or ablock. This is because the HTTP header is generated by the core server process before it even processes specific directory-level overrides.
Testing and Verification Methods
After you have applied your changes, it is vital to verify that the signatures are actually suppressed. You should not rely solely on what you see in a web browser, as browsers often cache headers or render error pages differently.
Using cURL
The most reliable method is using the command-line tool curl. Use the -I flag to fetch only the headers:
curl -I https://yourdomain.com
If configured correctly with ServerTokens Prod, the output should look like this:
HTTP/1.1 200 OK
Date: Mon, 12 Jan 2026 10:00:00 GMT
Server: Apache
Content-Type: text/html
Browser Developer Tools
- Open your website in a browser (Chrome, Firefox, or Edge).
- Press
F12to open Developer Tools. - Navigate to the Network tab.
- Refresh the page and click on the first request (usually your domain name).
- Look under Response Headers for the "Server" entry.
Testing Error Pages
To verify the ServerSignature Off setting, intentionally navigate to a non-existent page on your server (e.g., yourdomain.com/this-page-does-not-exist). Scroll to the bottom of the 404 page. If the setting is working, you will see a clean page without the "Apache/2.4.x Server at..." footer.
Common Pitfalls and Troubleshooting
Even with correct configuration, some administrators find that signatures still appear. Here are the most common reasons why:
1. Reverse Proxies and CDNs
If your server sits behind a Content Delivery Network (CDN) like Cloudflare or a reverse proxy like Nginx, the headers you see might be coming from the proxy, not the origin Apache server. Some CDNs add their own signatures or mask the origin's headers. Ensure you are testing the server's IP directly if possible.
2. Multiple Configuration Files
In modern Linux distributions, Apache often uses a "conf-enabled" directory structure. You might change the setting in apache2.conf, but a file inside /etc/apache2/conf-enabled/ might be overriding it later in the loading sequence. Always check for duplicate directives using grep:
grep -r "ServerTokens" /etc/apache2/
3. Custom Error Documents
If you have configured custom error pages using the ErrorDocument directive, Apache will not append a signature to those files. In this case, ServerSignature Off is redundant for those specific pages, but it is still good practice to have it set globally for pages you haven't customized.
4. PHP and Other Modules
Sometimes, the "Server" header is not the only place where information leaks. PHP often adds an X-Powered-By header. While this isn't technically an "Apache signature," it serves the same purpose for attackers. To disable this, you must edit your php.ini file and set expose_php = Off.
Frequently Asked Questions
Does disabling Apache signatures affect SEO?
No, disabling or modifying Apache signatures has no impact on Search Engine Optimization. Search engine crawlers like Googlebot do not require specific version strings in headers or footers to index a site. In fact, improving server security is generally viewed as a positive for overall site health.
Can I change the Server name to something else entirely?
Using the standard ServerTokens directive, you can only reduce the information to "Apache". To change the header to something completely different (e.g., "Server: MyCustomServer"), you would need to install a third-party module like mod_security or use a reverse proxy to rewrite the header. Standard Apache does not allow arbitrary strings for the Server header via basic configuration.
Is ServerSignature "On" by default?
In many legacy installations, ServerSignature was "On" by default. However, in most modern distributions in 2026, security-hardened default configurations often set this to "Off" or "Email". If set to "Email", it creates a mailto: link to the ServerAdmin specified in the configuration, which can also be a source of spam if not managed carefully.
What is the difference between ServerSignature Off and ServerSignature EMail?
ServerSignature Off completely removes the footer line from server-generated pages. ServerSignature EMail adds a line identifying the server and includes a "mailto" link to the address defined in the ServerAdmin directive. The EMail setting is rarely used in modern production environments as it reveals the administrator's email address to scrapers.
Does setting ServerTokens to Prod hide the OS type?
Yes. When ServerTokens is set to Prod (ProductOnly), the operating system (e.g., "Unix" or "Win32") is stripped from the HTTP response header. Only the word "Apache" will remain.
Expert Recommendation for 2026
For any production-facing Apache server, the following configuration is the industry standard for 2026. This setup minimizes the attack surface while remaining compliant with all major security frameworks.
- Set
ServerTokens Prodin the global configuration file. - Set
ServerSignature Offto ensure error pages remain clean. - Disable
expose_phpin your PHP configuration if applicable. - Use custom ErrorDocuments to provide a consistent user experience that doesn't reveal the underlying server technology.
By implementing these changes, you effectively "de-risk" your server's public profile. While it won't stop a determined attacker who uses advanced fingerprinting techniques (like TCP/IP stack analysis), it prevents 99% of automated scripts and low-level reconnaissance tools from identifying your specific software vulnerabilities.