RFC 1123 · · Internet Standard

The RFC that let hostnames start with a digit.

The official title is "Requirements for Internet Hosts, Application and Support." What it actually is: a correction sheet for email, DNS, FTP and Telnet, written in 1989. It is also, quietly, the reason 3com.com is a legal hostname and the reason your HTTP headers carry a four-digit year.

Status
✓ Still current
Also known as
STD 3
Updates
RFC 822, RFC 952

Written by Noel Lang · IT trainer

TL;DR

RFC 1123 tells an internet host what it must do at the application layer: Telnet, FTP, SMTP and DNS. It defines no protocol. It corrects the ones that already existed, after ten years of watching them meet real networks. It is half of STD 3 (the other half is RFC 1122 ), it legalised hostnames beginning with a digit, and its amendment to RFC 822 ’s date syntax is why HTTP still calls its date format rfc1123-date.

The problem it solves

By 1989 the internet’s application protocols were about a decade old and had been implemented, independently, by people working from documents that were precise about syntax and quiet about behaviour. What should a mail server do with a message whose date has a two-digit year? Must a resolver believe the first answer it gets? Is a hostname beginning with 3 legal or not?

Everyone had an answer. The answers only met when two implementations did. The protocols worked; the assumptions around them did not.

RFC 1123 and its twin RFC 1122 are the response, published the same day by the same editor. Between them they go through every layer of the stack and, at each ambiguity, write down a rule with exact force: this you must do, this you should, this you may. RFC 1122 takes everything below the application. RFC 1123 takes everything above. Together they are STD 3, and a host that claims to be an internet host is claiming to obey them.

The rulebook, not the rules

Think of a sport that grew up before anyone wrote the laws down. The rules exist: everybody knows roughly how the game works, because they learned it by playing. Then the sport gets big enough that two clubs from different towns meet, and it turns out one of them has always allowed something the other has always forbidden.

What you write at that point is not a new set of rules. It is a rulebook: an official ruling on every argument the game has actually had. Most entries are boring. Each one exists because somewhere, at some point, a match was ruined.

RFC 1123 is that rulebook for the application layer, and its most quoted entries are the smallest. Two of them shaped things you touch every day.

STD 3 is two documents, split by layer

A standard number names a requirement, not a document. STD 3 is the pair: RFC 1122 covers the communication layers, RFC 1123 covers the applications sitting on top of them.

RFC 1123 · application and supportTelnet§3FTP§4SMTP§5 · mailDNS§6 · supportRFC 1122 · communication layersTCP · UDPIP · ICMPlink layer
Neither document defines any of these protocols. Both say what a host must do when it implements them.

The digit, and the year

Section 2.1 changes one character of one rule. RFC 952 had said a hostname must begin with a letter. RFC 1123 relaxes it: a letter or a digit. The reason was mundane and commercial. Companies were named 3Com and 3M, and they wanted domains that looked like their names. Every hostname starting with a number, on the entire internet, rests on that sentence. The old rule still haunts validation regexes written by people who learned it and never learned it changed.

Section 5.2.14 does something similar to time. RFC 822 had allowed a two-digit year in an email’s Date header, which was fine in 1982 and looked less fine as 2000 approached. RFC 1123 requires four digits. Years later, HTTP needed a date format for its headers, looked at what email was doing, and adopted that exact shape. It named the grammar production rfc1123-date, and the name stuck. When your language’s standard library offers you an “RFC 1123 date”, it is quietly honouring a 1989 footnote about email, in a protocol that document never mentioned.

Both changes are one sentence long. Both are the sort of thing you only get to fix once, before too much of the world depends on the old answer.

What the RFC actually says

Organised protocol by protocol. Nobody reads it end to end; people look up the clause they are arguing about:

Section In plain words
2 · General Issues The famous one. Section 2.1 relaxes the hostname rule so the first character may be a digit, and warns implementers not to assume a name is not an address.
3 · Telnet How a Telnet client and server must negotiate options without deadlocking each other. A surprising amount of the section is about not being rude.
4 · File Transfer FTP and TFTP. Mostly about transfer modes, and about the fact that a passive-mode server must actually listen where it said it would.
5 · Electronic Mail SMTP and the RFC 822 message format. Contains the date amendment: a four-digit year, please, and be liberal about what you parse.
6 · Support Services DNS, and how a resolver must behave: follow the referral, respect the TTL, and never assume a name has exactly one address.

Things people get wrong

  • "A hostname cannot begin with a number."

    It could not, until 1989. required the first character to be a letter, which was fine until companies named 3Com wanted a domain. Section 2.1 of RFC 1123 relaxed the rule in a single sentence, and the entire modern web of 3com.com and 1password.com rests on it. The old rule survives in folklore, and in the occasional overzealous validation regex.

  • "RFC 1123 defines the date format used by HTTP."

    It defines an amendment, not a format. The shape comes from : day, month, year, time, zone. What RFC 1123 added was the requirement that the year have four digits rather than two. HTTP then adopted that exact shape and named the production rfc1123-date, so the label stuck to the document that fixed the year rather than to the one that invented the layout.

  • "RFC 1123 defines SMTP and DNS."

    It defines neither. It is a requirements document: it walks through protocols that already existed and says what a host must do with them in practice. Where it and a modern specification disagree, the modern one wins. Its SMTP clauses were later updated by , its DNS clauses by RFC 2181. The document remains standard for everything nobody has revisited.

  • "STD 3 must be obsolete by now."

    It is still an Internet Standard, more than thirty-five years on, and it has never been obsoleted. Individual clauses have been superseded, which is a different thing: the document keeps its status while the parts that aged out get replaced by name. That is how the RFC series handles a document too foundational to withdraw and too old to be entirely right.

Where you'll meet RFC 1123

Almost never by name, constantly by consequence. A field guide:

You see What it means
Date: Sun, 06 Nov 1994 08:49:37 GMT An HTTP header in what the HTTP specs literally call rfc1123-date. The four-digit year is this document's doing.
.NET's "R" format specifier Documented as the RFC 1123 pattern. Java, Go and Python carry equivalents under the same name.
3com.com, 1password.com Hostnames beginning with a digit, legal only because section 2.1 relaxed the rule RFC 952 had set.
"Must comply with STD 3" in a datasheet A claim to follow both RFC 1122 and RFC 1123. Whether anyone tested it is a separate question.
A resolver that honours the TTL Section 6 said it must. Decades of caches have mostly obeyed, and the ones that did not caused outages people still tell stories about.

Questions people actually ask

What is RFC 1123? +

RFC 1123 is a requirements document from 1989 that says what an internet host must, should and may do at the application layer: Telnet, FTP, SMTP and DNS. It defines no protocol of its own. Instead it corrects and clarifies the existing ones after a decade of implementation experience. Together with RFC 1122 it forms STD 3, and both are still Internet Standards.

What is the RFC 1123 date format? +

It is the day-of-week, day, three-letter month, four-digit year, time and zone format, for example Sun, 06 Nov 1994 08:49:37 GMT. RFC 1123 did not invent it: it amended RFC 822's date syntax to require a four-digit year. HTTP later adopted exactly that shape and named it rfc1123-date, which is why libraries such as .NET's "R" format specifier are labelled RFC 1123 to this day.

Can a hostname start with a number? +

Yes, and RFC 1123 is the reason. RFC 952 had required the first character of a hostname to be a letter. Section 2.1 of RFC 1123 relaxed that rule to allow a letter or a digit, because real companies had names like 3Com and wanted matching domains. Every hostname beginning with a digit, from 3com.com onwards, exists on the strength of one sentence written in 1989.

What is the difference between RFC 1122 and RFC 1123? +

They are two halves of one document, published the same day by the same editor, and together they are STD 3. RFC 1122 covers the communication layers: link layer, IP, ICMP, UDP and TCP. RFC 1123 covers the application layer: Telnet, FTP, SMTP and DNS. Neither makes sense without the other.

Is RFC 1123 still current? +

Yes. It is an Internet Standard and has never been obsoleted, though individual clauses have been superseded. Its SMTP rules, for instance, were updated by RFC 5321, and its DNS rules by RFC 2181. The document still stands as half of STD 3; when a specification says a host must follow STD 3, this is what it means for the application layer.

Referenced by

Other explainers on this site that point back to this RFC:

How RFC 1123 connects

What came before

  1. RFC 822 (1982) defined the email message. RFC 1123 went back and required a four-digit year in its date header, the small change that HTTP later borrowed and named after this document.

  2. RFC 952 (1985) required a hostname to begin with a letter. Section 2.1 of RFC 1123 changed that to allow a digit, and every 3-something.com since then depends on it.

Part of a guided cluster: The networking basics, explained