Skip to content

Domain name resolution does not handle RFC6761 special names correctly #118569

@rzikm

Description

@rzikm

RFC 6761 Defines several DNS names to be handled specially by DNS resolution APIs and libraries:

  • localhost, and *.localhost should always resolve to respective loopback address
  • invalid and *.invalid should always resolve to NXDOMAIN response

Unfortunately, current OS-level resolution APIs on both Windows and Linux (I did not check MacOS, but I assume the situation is going to be identical to Linux) do not recognize subdomains of localhost or invalid as special, and forward the queries to the respective DNS server (which is against the RFC spec).

This feature would play well with dotnet/aspnetcore#62593, which introduces support for localhost subdomains was for local development.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-System.Netgood first issueIssue should be easy to implement, good for first-time contributorshelp wanted[up-for-grabs] Good issue for external contributors

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions