Taylor
Taylor

Reputation: 21

Can an IP address be a valid domain name?

Consider the domain name 111.111.111.111. AFAICT this should be valid since it consists of valid characters and doesn't start with a -. So I have a few questions.

  1. Is this really a valid domain name?

  2. Will modern DNS be able to handle this domain name?

  3. How do programs (ex. browsers) decide if the host URL part is a domain name or an IP address?

Upvotes: 2

Views: 1184

Answers (1)

Patrick Mevzek
Patrick Mevzek

Reputation: 12545

  1. Is this really a valid domain name?

No. Because of various RFCs and documentation over the year. I can point you to another reply of mine that deals with that extensively: https://stackoverflow.com/a/53875771/6368697

The gist of it: RFC3696 has this phrase "There is an additional rule that essentially requires that top-level domain names not be all- numeric." that was later enshrined in multiple other documents.

So it voids out your string as a domain name. But see the content of my reply about the attempt made by the .42 registry.

  1. Will modern DNS be able to handle this domain name?

Some will, some won't. See the .42 experiment.

  1. How do programs (ex. browsers) decide if the host URL part is a domain name or an IP address?

The list of TLDs is known and "short" (under 2000 items). It evolves, but slowly. It is then easy to check if "something" is under a TLD. The other heuristic would be to filter out anything "all numeric" but like explained at length in the other reply, this was kind of a gray area so interpretations did vary. At least under current ICANN rules, an all numeric TLD is forbidden.

Upvotes: 1

Related Questions