Choose the suffix that matches the purpose
02The four reserved TLDs have different intended uses. They are not interchangeable labels for a private network.
app.localhost illustrates a loopback name. Do not point it at another device or assume a loopback service is safe or authorized just because it is local.
Source for this drawing: RFC 2606 · Read RFC section 2 ↗
New to this? Start hereA quick picture + helpful background
A message needs an address.
Think of a packet as a small addressed envelope. Devices pass it onward; transport protocols decide what delivery promises an application gets.
Helpful first, if these ideas are unfamiliar
These pictures are analogies to help you learn. The linked RFC explains the actual rules.
Terms in this drawing
Related RFCs and changes
“Updates” changes part of an earlier RFC. “Obsoletes” replaces it. This list shows selected related documents.
.test is recommended for testing current or new DNS-related code; .example is recommended for documentation and examples.
- .test is recommended for testing current or new DNS-related code; .example is recommended for documentation and examples.
- .invalid is intended for obviously invalid constructed names. .localhost is reserved for the traditional loopback use; a loopback address returns to the same host.
- These purposes come from RFC 2606. RFC 6761 later specifies how different software layers should handle the names; reservation does not mean every suffix receives the same answer.
The four scenes are independent choices, not sequential DNS queries. The names are plain text, not active links or requests. Current API and caching-layer distinctions are explained separately in the resolver chapter.
Read the RFC section ↗