Find URL IP Address: Only One Part of It Goes Looking
A URL is a sentence with seven slots, and a DNS question has room for one field. Everything you paste after the host, the door number, the folder, the search terms, the section marker, stays inside the request. None of it helps decide which machine receives the request.
We checked the boundary against four public resolvers on 23 October: the same name spelled plainly, with letters re-cased, and with a trailing dot came back as the same address sets every time, while a name with one empty label failed four different ways at four resolvers. In a real proxy list, all 103 host slots were literal IPv4 addresses, so for those URLs the question never has to be asked at all.
Paste a URL to see the parts separated and the host resolved.
Seven parts, one question. The host is the only slot that goes looking.
measured
URL anatomy bench
Seven parts on display, one of them resolved, the rest proven absent from the question.
The bench parses the URL the way the browser does, marks the host row, and asks two public resolvers only when the host is a name. Nothing you type is stored or sent anywhere else.
1. The anatomy of a URL
Every URL is a sentence with seven slots, and only one slot names a machine. The scheme says how to talk once you get there. The userinfo slot holds a login for the few protocols that accept one inside the address. The host is the only part that becomes a DNS question. The port selects a door on whatever machine the host found. The path, the query and the fragment travel inside the request after the connection exists, which is why none of them can influence which machine you reach.
| Part | Example | Reaches DNS |
|---|---|---|
| scheme | https: | no, it names a protocol |
| userinfo | user@ | no, an authentication field |
| host | www.example.com | yes, the only one |
| port | :8080 | no, a door on the machine |
| path | /folder/page | no, read by the server later |
| query | ?q=1&lang=en | no, read by the server later |
| fragment | #section | no, never leaves the browser |
The bench above runs this separation live. It parses your input the way the browser does, marks the host row, and classifies the host before any network call: a literal address needs no lookup, a loopback name never leaves the machine, an encoded name is converted before the question is asked, and everything else is sent to two public resolvers for A and AAAA records. The other six parts are displayed, labeled, and provably absent from the question.
2. When the host is already an address
The host slot does not have to hold a name at all. An address written directly into the URL skips the looking entirely, and this is not a rare corner: in the free proxy list we harvested on 22 October, all 103 entries were written exactly that way, scheme, literal IPv4 address, colon, port. For every one of those URLs the question of what its IP is was answered before any resolver was contacted, by the person who wrote the list.
| Port in the URL | Entries | What the port is for |
|---|---|---|
| 1080 | 24 | SOCKS, the port this site is about |
| 4145 | 16 | an older SOCKS variant |
| 80 | 5 | plain web |
| 8080 | 2 | web on an alternate door |
| 9080, 10808, 6379 | 6 | mixed services |
| 18 other ports | 50 | one entry each |
Twenty-four different ports, and the address in front of the colon never changes with them. The port divides services on a machine; it has no vote on which machine is chosen. A client that connects to the address on port 1080 and one that connects on port 80 are talking to the same machine, unless the entries were written by different hands, which the proxy list in question makes hard to tell.
3. What changes the question and what does not
To test the boundary we queried the same name three ways against four public resolvers on 23 October: plain, with letters re-cased, and with a trailing dot. All four resolvers returned the same set of addresses for all three spellings, down to the last octet. Decoration on the name is folded away before the question is asked, exactly as decoration on the URL is never asked about at all.
| Input | alidns | dns.google | cloudflare | dns.sb |
|---|---|---|---|---|
| example.com | 2 records | 2 records | 2 records | 3 records |
| letters re-cased | same set | same set | same set | same set |
| trailing dot | same set | same set | same set | same set |
A name that is merely decorated still resolves. A name that is malformed does not get that far, and it fails with no agreement at all. We queried a name containing an empty label and the four resolvers produced four different failures: one returned HTTP 401, one answered with an HTML error page instead of JSON, one returned HTTP 400, and one returned HTTP 503 carrying a SERVFAIL code. There is no standard error for a question that should never have been asked, and the URL layer does not save you either: the browser accepted the empty label, because the URL standard does not forbid it, and passed the question to resolvers that each failed in its own way.
4. The name you see is not the name that is asked
Internationalized addresses add one more layer between what you read and what resolves. The Russian government domain reads as Cyrillic letters in the address bar, but the question that went out carried its encoded form, and all four resolvers answered that encoded name with the same two addresses. The browser performs the conversion automatically, which is why the bench can show you both forms of the same name.
| Name as displayed | Name in the DNS question | A records returned |
|---|---|---|
| Cyrillic government domain | xn--b1aew.xn--p1ai | 185.6.47.14, 185.6.47.15 |
| Cyrillic example domain | xn--e1afmkfd.xn--p1ai | 89.253.237.94 |
| underscore record name | _dmarc.github.com | status 0, no records |
The last row is the opposite boundary. An underscore name is a legal DNS label and carries mail-policy records, but asking for its address returns an empty answer, not an error. The bench reports both outcomes distinctly, because a name that exists without addresses and a name that does not exist look identical in most tool output, and they are different facts with different fixes.
Frequently asked questions
Which part of a URL is sent to DNS?
Only the host. The scheme says how to talk, the port names a door on the machine, the path, query and fragment are passed to the server after the connection is open, and userinfo is an authentication field. None of them enters the DNS question. The measured runs back this: mixed case and a trailing dot returned the same address sets as the plain name at all four resolvers.
Why does a URL with an IP address not need a DNS lookup?
Because the address is already written in the URL. In a free proxy list the host part is a literal IPv4 address in every one of 103 entries we checked, with 24 different ports after the colon. The client connects straight to that number and DNS is never asked.
What is the xn-- prefix in a domain name?
It marks a punycode encoding of an internationalized name. The Russian government domain that reads as Cyrillic letters is written xn--b1aew.xn--p1ai on the wire, and all four resolvers we tested answered that form with the same two addresses. Browsers convert the name automatically; the address you find belongs to the encoded form.
Does the port in a URL change its IP address?
No. The port selects a service on the machine that the address already points to. The same host with port 80, port 8080 or any other port produces the same DNS question, and the measurements show the decoration never changes the answer set.