<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/what-came-first-the-cname-or-the-a-record--5wsanjo0l" -->

---
title: What came first: the CNAME or the A record? | daily.dev
description: A routine memory optimization to Cloudflare&#x27;s 1.1.1.1 resolver accidentally changed the order of CNAME records in DNS responses, breaking resolution for...
canonical: https://daily.dev/posts/what-came-first-the-cname-or-the-a-record--5wsanjo0l
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: What came first: the CNAME or the A record? | daily.dev
og:description: A routine memory optimization to Cloudflare&#x27;s 1.1.1.1 resolver accidentally changed the order of CNAME records in DNS responses, breaking resolution for...
og:url: https://daily.dev/posts/what-came-first-the-cname-or-the-a-record--5wsanjo0l
og:image: https://api.daily.dev/og/posts/5Wsanjo0L.png
og:image:alt: What came first: the CNAME or the A record?
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# What came first: the CNAME or the A record?

**[Cloudflare](https://daily.dev/sources/cloudflare)** · 11 min read · 61 upvotes · 1 comments

## Summary

A routine memory optimization to Cloudflare's 1.1.1.1 resolver accidentally changed the order of CNAME records in DNS responses, breaking resolution for clients like glibc's getaddrinfo and causing Cisco switches to reboot. The incident revealed that while RFC 1034 uses the word "preface" to suggest CNAMEs should appear first, it lacks normative language (MUST/SHOULD) making the requirement ambiguous. Some DNS clients use sequential parsing that expects CNAMEs before A records, while others search the entire answer set. Cloudflare reverted the change and proposed an Internet-Draft to formally clarify CNAME ordering requirements in DNS responses.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://blog.cloudflare.com/cname-a-record-order-dns-standards/>

## Community discussion

Top comments from developers on daily.dev.

**@giorgiolino** · 2 upvotes

> Very interesting and Informative read about some subtle internals of DNS resolution; sometimes you think you know something enought, just to realize that there are (often) levels to this.

## Similar posts on daily.dev

- [How CNAME Ordering in RFC Specs Caused Cloudflare 1.1.1.1 Outage](https://daily.dev/posts/how-cname-ordering-in-rfc-specs-caused-cloudflare-1-1-1-1-outage-skytaujxo) · InfoQ · 1 upvotes · 0 comments
- [DNS Explained - How Domain Names Get Resolved](https://daily.dev/posts/dns-explained---how-domain-names-get-resolved-zhpljm8wy) · Hacker News · 3 upvotes · 0 comments

---

Tags: [#cloudflare](https://daily.dev/tags/cloudflare), [#dns](https://daily.dev/tags/dns), [#networking](https://daily.dev/tags/networking), [#rust](https://daily.dev/tags/rust)

[View this post on daily.dev](https://daily.dev/posts/what-came-first-the-cname-or-the-a-record--5wsanjo0l)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"What came first: the CNAME or the A record?","url":"https://daily.dev/posts/what-came-first-the-cname-or-the-a-record--5wsanjo0l","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/what-came-first-the-cname-or-the-a-record--5wsanjo0l"},"datePublished":"2026-01-14T14:15:16.939Z","dateModified":"2026-03-15T05:25:05.595Z","description":"A routine memory optimization to Cloudflare's 1.1.1.1 resolver accidentally changed the order of CNAME records in DNS responses, breaking resolution for...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/95c048a53899d8d2bdcaff94c6176cf7?_a=AQAEulh","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/95c048a53899d8d2bdcaff94c6176cf7?_a=AQAEulh","isAccessibleForFree":true,"articleSection":"Cloudflare","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Cloudflare","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/38522e1d11354cd6b7af66f9d4316735","url":"https://daily.dev/sources/cloudflare"},"commentCount":1,"discussionUrl":"https://daily.dev/posts/what-came-first-the-cname-or-the-a-record--5wsanjo0l","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":61},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":1}],"keywords":"cloudflare,dns,networking,rust","timeRequired":"PT11M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Cloudflare","item":"https://daily.dev/sources/cloudflare"},{"@type":"ListItem","position":3,"name":"What came first: the CNAME or the A record?"}]}
{"@context":"https://schema.org","@type":"WebPage","@id":"https://daily.dev/posts/what-came-first-the-cname-or-the-a-record--5wsanjo0l","comment":[{"@type":"Comment","text":"Very interesting and Informative read about some subtle internals of DNS resolution; sometimes you think you know something enought, just to realize that there are (often) levels to this.","datePublished":"2026-01-22T21:01:41.878Z","dateModified":"2026-01-22T21:01:59.121Z","url":"https://daily.dev/posts/5Wsanjo0L#c-6gJ1JgQDg","author":{"@type":"Person","name":"Georges-King NJOCK-BÔT","url":"https://daily.dev/giorgiolino","image":"https://avatars.githubusercontent.com/u/584791?v=4"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":2}}]}
```

