Back to all summaries

What came first: the CNAME or the A record?

Sebastiaan Neuteboom
1.1.1.1 Post Mortem DNS Resolver Standards Bugs Consumer Services

AI-Generated Summary: This is an automated summary created using AI. For the full details and context, please read the original post.

Summary of the Cloudflare Blog Post: "What came first: the CNAME or the A record?"

Cloudflare recently experienced a DNS resolution failure due to a subtle change in the order of records within their DNS responses. The issue arose when a routine update to 1.1.1.1, aimed at reducing memory usage, introduced a change in the code that merges CNAME chains with the final resolved records. The change, which was released on January 7, 2026, caused CNAME records to appear at the bottom of the response, instead of at the top, where they were previously stored.

Key Technical Details:

  • The change occurred in the fill_cache function of the PartialChain implementation, which is responsible for merging CNAME chains with the final resolved records.
  • The original code created a new list, inserted the existing CNAME chain, and then appended the new records.
  • The updated code, which was introduced to save memory allocations and copies, appends the CNAMEs to the existing answer list, resulting in CNAME records appearing at the bottom of the response.

Practical Implications for Developers:

  • Some DNS client implementations expect CNAME records to appear at the top of the response, and may not handle the new order correctly.
  • Developers should be aware of the potential impact of this change on their DNS clients and take necessary measures to handle the new order of records.
  • Cloudflare has since reverted the change, but developers should be cautious when implementing similar changes in their own systems.

Timeline:

  • December 2, 2025: The record reordering change was introduced to the 1.1.1.1 codebase.
  • December 10, 2025: The change was released to the testing environment.
  • January 7, 2026: The global release containing the change started.
  • January 8, 2026: The incident was declared, and the release was reverted.

Want to read the full article?

Read Full Post on Cloudflare Blog