
gittech. site
for different kinds of informations and explorations.
underattack.txt Internet Standard
Published at
Jan 16, 2025
Main Article
underattack.txt Internet Standard
Overview
The underattack.txt
file is a text file placed in the root directory of a server's web directory (e.g., https://example.com/underattack.txt
). This file provides information on whether the host is currently under external attack. The format is designed to be simple, extensible, and machine-readable.
Specification
File Location: The file must be served at the root level of the host's domain:/underattack.txt
- Example URL:
https://example.com/underattack.txt
- Example URL:
Content Format: The file must contain a single line in the format:
underattack:[yes|no]
yes
: Indicates the host is under external attack.no
: Indicates the host is not under external attack.
File Encoding:
- The file must be UTF-8 encoded.
- No additional whitespace or characters are permitted outside the defined format.
HTTP Headers:
- The server must return the file with the MIME type
text/plain
.
- The server must return the file with the MIME type
Extensibility
To support future extensions, additional fields may be appended to the file in the format:
fieldname:value
Rules for Extensions:
- Each new field must be on a separate line.
- Fields must use lowercase alphanumeric names and hyphens (
-
) as separators. - Unknown fields must be ignored by parsers for backward compatibility.
- Example of an extended format:
underattack:yes mitigation-status:active attack-type:ddos
Example Usage
- Not under attack:
underattack:no
- Under attack with extensions:
underattack:yes mitigation-status:active attack-type:ddos
Compliance
- Hosts adopting
underattack.txt
must ensure the file is accessible via HTTPS. - Parsers must interpret only defined fields and ignore unrecognized extensions.
- Updates to this standard will provide backward-compatible changes to ensure interoperability.
Version History
- January 16, 2025. Initial version.