frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

What came first: the CNAME or the A record?

https://blog.cloudflare.com/cname-a-record-order-dns-standards/
69•linolevan•1h ago

Comments

charcircuit•56m ago
Random DNS servers and clients being broken in weird ways is such a common problem and will probably never go away unless DNS is abandoned altogether.

It's surprising how something so simple can be so broken.

patrickmay•52m ago
A great example of Hyrum's Law:

"With a sufficient number of users of an API, it does not matter what you promise in the contract: all observable behaviors of your system will be depended on by somebody."

combined with failure to follow Postel's Law:

"Be conservative in what you send, be liberal in what you accept."

mmastrac•17m ago
Postel's law is considered more and more harmful as the industry evolved.
n2d4•13m ago
Very much so. A better law would be conservative in both sending and accepting, as it turns out that if you are liberal in what you accept, senders will choose to disobey Postel's law and be liberal in what they send, too.
esafak•8m ago
I think it is okay to accept liberally as long as you combine it with warnings for a while to give offenders a chance to fix it.
frumplestlatz•46m ago
Given my years of experience with Cisco "quality", I'm not surprised by this:

> Another notable affected implementation was the DNSC process in three models of Cisco ethernet switches. In the case where switches had been configured to use 1.1.1.1 these switches experienced spontaneous reboot loops when they received a response containing the reordered CNAMEs.

... but I am surprised by this:

> One such implementation that broke is the getaddrinfo function in glibc, which is commonly used on Linux for DNS resolution.

Not that glibc did anything wrong -- I'm just surprised that anyone is implementing an internet-scale caching resolver without a comprehensive test suite that includes one of the most common client implementations on the planet.

kayson•46m ago
> However, we did not have any tests asserting the behavior remains consistent due to the ambiguous language in the RFC.

Maybe I'm being overly-cynical but I have a hard time believing that they deliberately omitted a test specifically because they reviewed the RFC and found the ambiguous language. I would've expected to see some dialog with IETF beforehand if that were the case. Or some review of the behavior of common DNS clients.

It seems like an oversight, and that's totally fine.

bombcar•41m ago
I took it as being "we wrote the tests to the standard" and then built the code, and whoever was writing the tests didn't read that line as a testable aspect.
kayson•7m ago
Fair enough.
supriyo-biswas•40m ago
My reading of that statement is their test, assuming they had one, looked something like this:

    rrs = resolver.resolve('www.example.test')
    assert Record("cname1.example.test", type="CNAME") in rrs
    assert Record("192.168.0.1", type="A") in rrs
Which wouldn't have caught the ordering problem.
renewiltord•41m ago
Nice analysis. Boy I can’t imagine having to work at Cloudflare on this stuff. A month to get your “small in code” change out only to find some bums somewhere have written code that will make it not work.
stackskipton•30m ago
Or when working on massive infrastructure like this, you write plenty of tests that would have saved you a month worth of work.

They write reordering, push it and glibc tester fires, fails and you quickly discover "Crap, tests are failing and dependency (glibc) doesn't work way I thought it would."

ShroudedNight•34m ago
I'm not an IETF process expert. Would this be worth filing errata against the original RFC in addition to their new proposed update?

Also, what's the right mental framework behind deciding when to release a patch RFC vs obsoleting the old standard for a comprehensive update?

therein•19m ago
After the release got reverted, it took an 1hr28min for the deployment to propagate. You'd think that would be a very long time for CloudFlare infrastructure.
steve1977•16m ago
I don't find the wording in the RFC to be that ambiguous actually.

> The answer to the query, possibly preface by one or more CNAME RRs that specify aliases encountered on the way to an answer.

The "possibly preface" (sic!) to me is obviously to be understood as "if there are any CNAME RRs, the answer to the query is to be prefaced with those CNAME RRs" and not "you can preface the query with the CNAME RRs or you can place them wherever you want".

paulddraper•11m ago
100%

I just commented the same.

It's pretty clear that the "possibly" refers to the presence of the CNAME RRs, not the ordering.

forinti•14m ago
> While in our interpretation the RFCs do not require CNAMEs to appear in any particular order, it’s clear that at least some widely-deployed DNS clients rely on it. As some systems using these clients might be updated infrequently, or never updated at all, we believe it’s best to require CNAME records to appear in-order before any other records.

That's the only reasonable conclusion, really.

sebastianmestre•14m ago
I kind of wish they start sending records in randomized order to take out all the broken implementations that depend on such a fragile property
paulddraper•12m ago
> RFC 1034, published in 1987, defines much of the behavior of the DNS protocol, and should give us an answer on whether the order of CNAME records matters. Section 4.3.1 contains the following text:

> If recursive service is requested and available, the recursive response to a query will be one of the following:

> - The answer to the query, possibly preface by one or more CNAME RRs that specify aliases encountered on the way to an answer.

> While "possibly preface" can be interpreted as a requirement for CNAME records to appear before everything else, it does not use normative key words, such as MUST and SHOULD that modern RFCs use to express requirements. This isn’t a flaw in RFC 1034, but simply a result of its age. RFC 2119, which standardized these key words, was published in 1997, 10 years after RFC 1034.

It's pretty clear that CNAME is at the beginning.

The "possibly" does not refer to the order but rather to the presence.

If they are present, they are are first.

NelsonMinar•9m ago
It's remarkable that the ordinary DNS lookup function in glibc doesn't work if the records aren't in the right order. It's amazing to me we went 20+ years without that causing more problems. My guess is most people publishing DNS records just sort of knew that the order mattered in practice, maybe figuring it out in early testing.
pixl97•3m ago
I think it's more of a server side ordering, in which there were not that many DNS servers out there, and the ones that didn't keep it in order quickly changed the behavior because of interop.

CNAMES are a huge pain in the ass (as noted by DJB https://cr.yp.to/djbdns/notes.html)

The Unpredicted vs. the Over-Expected

https://kevinkelly.substack.com/p/the-unpredicted-vs-the-over-expected
1•thm•43s ago•0 comments

Show HN: Lykly.ai

https://www.lykly.ai/
1•andrewtbham•2m ago•0 comments

The Copyrightability of Fonts Revisited

https://matthewbutterick.com/chron/the-copyrightability-of-fonts-revisited.html
1•Tomte•2m ago•0 comments

What Is Glitter? – a journey to the glitter factory

https://www.nytimes.com/2018/12/21/style/glitter-factory.html
1•sogen•3m ago•0 comments

Bzfs 1.17.0 near real-time ZFS replication tool is out

https://github.com/whoschek/bzfs
1•werwolf•4m ago•0 comments

I built a tiny daemon that reminds me what matters

2•amitdawar•4m ago•0 comments

The Battle of the AI Scribes

https://fernsology.substack.com/p/the-battle-of-the-ai-scribes
1•funmi5•6m ago•0 comments

PolyMCP: A simple way to interact with MCP servers using custom agents

https://github.com/poly-mcp/Polymcp
1•marcobambini•6m ago•0 comments

Product Switching – Through the Lens of Stacked Rocks

https://fernsology.substack.com/p/product-switching-through-the-lens
1•funmi5•8m ago•1 comments

Charting a Moral Vision of American Foreign Policy

https://adw.org/news/joint-statement-morality-u-s-foreign-policy-english/
1•layer8•8m ago•0 comments

There Is No Comfortable Reading Position

https://slate.com/life/2026/01/body-books-reading-position-posture-pain.html
5•oumua_don17•8m ago•1 comments

Meta Lays Off 1,500 People in Metaverse Division

https://www.wsj.com/tech/meta-layoffs-reality-labs-2026-347008b0
4•toomanyrichies•9m ago•1 comments

How to bury your father (2025)

https://buttondown.com/monteiro/archive/how-to-bury-your-father/
2•NaOH•10m ago•0 comments

Austrian cow shows first case of flexible, multi-purpose tool use in cattle

https://phys.org/news/2026-01-austrian-cow-case-flexible-multi.html
3•bikenaga•10m ago•1 comments

TheCatName

https://thecatname.com
1•buling•12m ago•0 comments

Choropleth Map

https://en.wikipedia.org/wiki/Choropleth_map
1•tosh•14m ago•0 comments

Show HN: tunn – Share localhost like a Google Doc

https://tunn.to/
2•behrlich•15m ago•0 comments

Treatment of a teenager with an ultra-rare condition is a medical milestone

https://www.economist.com/science-and-technology/2026/01/19/treatment-of-a-teenager-with-an-ultra...
1•kieranmaine•17m ago•0 comments

New York Stock Exchange Reveals Trading Platform for Tokenized Stocks and ETFs

https://decrypt.co/355012/new-york-stock-exchange-trading-platform-tokenized-stocks-etfs
2•dreadsword•17m ago•1 comments

Claude Code's Insidious Progressive Intelligence

https://bertolami.com/index.php?engine=blog&content=posts&detail=insidious-progressive-intelligence
4•platunit2•18m ago•0 comments

Big Ball of Mud

https://www.laputan.org/mud/
2•thunderbong•18m ago•0 comments

US pressure revives call for powerful EU tech regulator

https://www.politico.eu/article/us-pressure-revives-calls-for-standalone-eu-tech-regulator/
2•saubeidl•19m ago•1 comments

US Places Arctic Airborne Troops on Standby as Greenland Dispute Escalates

https://www.thedefensenews.com/news-details/Pentagon-Places-1500-Arctic-Trained-Airborne-Troops-o...
3•palata•19m ago•0 comments

G4 (Severe) Geomagnetic Storm Watch for 20 January UTC-Day

https://www.swpc.noaa.gov/news/g4-severe-geomagnetic-storm-watch-20-january-utc-day
2•rediguanayum•20m ago•2 comments

Are Arrays Functions?

https://futhark-lang.org/blog/2026-01-16-are-arrays-functions.html
1•fanf2•20m ago•0 comments

Show HN: I built autonomous A/B testing – it generates ideas, tests, and learns

https://abee.pro
1•Abeeprodev•21m ago•0 comments

Trump's Letter to Norway Should Be the Last Straw

https://www.theatlantic.com/ideas/2026/01/trump-letter-to-norway/685676/
13•Manheim•22m ago•4 comments

Russia Gloats over Greenland Tensions

https://www.bbc.co.uk/news/articles/c17zpvkddpzo
3•treadump•22m ago•0 comments

The Overcomplexity of the Shadcn Radio Button

https://paulmakeswebsites.com/writing/shadcn-radio-button/
1•todsacerdoti•22m ago•0 comments

Smartphones Can Cause Nearsighteness

https://pmc.ncbi.nlm.nih.gov/articles/PMC12070634/
3•josefritzishere•23m ago•1 comments