Resolve The Public IP Of A URL
Resolve The Public IP Of A URL
The dig
command is a utility for doing DNS lookups. You can run it with a URL argument to lookup the public IP for that domain.
The output is a bit noisy, but if you parse down to the ANSWER SECTION, you'll see the IP address that it resolves to.
Alternatively, you can skip the noise and get right to the IP address by including the +short
flag.
See man dig
for more details.
Last updated