Find IP of website via Chrome console

45

9

I have just changed the DNS records for a website, but they have yet to propagate on the East coast. Fortunately, I can see the change via my West coast proxy.

I need to get the IP of the new server that the new records are pointing to. Is there a fast and easy way to do this via the Chrome developer console?

Alex Waters

Posted 2012-08-01T23:46:21.763

Reputation: 1 216

1

Ans here: https://superuser.com/a/1254200/78897

– Pacerier – 2017-09-27T17:53:30.130

Answers

8

Looking through the console, I don't see any built-in function to do this. However, there are several Chromium extensions that do what you want.

One of them is ipvfoo (web store). It displays the hostname and corresponding IPv4/IPv6 address for all requests made when loading the current page:

ipvfoo screenshot

Mechanical snail

Posted 2012-08-01T23:46:21.763

Reputation: 6 625

84

Actually yes you can.

  1. Go to Developer Tools > Network.

  2. Reload your page.

  3. Select one of the URLs from the domain in question. The IP will be shown under Headers > General > Remote Address.

s29

Posted 2012-08-01T23:46:21.763

Reputation: 941

I get a different result when I use ping. I was testing on a parked domain, so may there was some kinda redirect that doesn't show up in browser history. – jiggunjer – 2015-12-05T17:39:45.590

2Unfortunately this only works if you actually get a page to look at. If it doesn't serve a page there ("This site can't be reached" or similar) then there won't be any urls to inspect. – Aaron R. – 2016-08-04T16:03:05.157

I stand corrected; there won't be any Headers to inspect. It did load up after 30 seconds or so. However there were only "Provisional" headers, which still didn't give the IP. – Aaron R. – 2016-08-04T16:09:19.390

Weirdly, this doesn't work for example.org. The IP is 93.184.216.34 in the header, but when I go there, I get a 404 error. – wjandrea – 2017-08-15T02:11:29.440

1@AaronR. This is most unfortunate when you are trying to troubleshoot why a DNS lookup is failing (e.g. to confirm that the local DNS server isn't giving you the LAN IP address and the fact that you are getting the external IP address is why the page load is timing out!) – Michael – 2018-02-10T02:56:16.017

7

You can use this tab in Chrome, it shows you all the IP addresses that the browser is serving pages from.

Just type this into the browser URL and you should be good from there!
chrome://net-internals/#dns

Joel Divine

Posted 2012-08-01T23:46:21.763

Reputation: 87

1This is no longer true in the latest versions of Chrome. – Clonkex – 2019-11-21T05:45:31.017

2Yeah, I'm seriously upset that they removed this feature from Chrome with no replacement.. Also didn't hear many people talk about it's removal either. But it was a seriously useful tool! :( – Joel Divine – 2019-11-24T10:56:25.530

Indeed, pretty unfortunate :( – Clonkex – 2019-11-24T21:26:55.770

3

If it doesn't have to be through the Chrome console, just ping the website in command prompt and it will give you the IP address.

cutrightjm

Posted 2012-08-01T23:46:21.763

Reputation: 3 966

8My windows command prompt isn't routing through my proxy the way my browser is =( It just gives me the IP of the old server if I do that – Alex Waters – 2012-08-02T02:04:21.357

0

EDIT: The DNS cache viewing feature mentioned below has now been removed from Chrome.

The web tools network activity method can be confusing on some sites as you can see many different IP addresses. What you might be after is the single IP address returned by a DNS lookup. Chrome has an internal cache of DNS lookups which you can use.

Visit the website in question, then quickly type chrome://net-internals/#dns in the address bar. Finally lookup the website (e.g. facebook.com) in the table.

Bear in mind the cache may remove entries after a period of time.

BaldockJa

Posted 2012-08-01T23:46:21.763

Reputation: 11

0

If your problem is (was) that the IP address would flip back and forth between the old and new one, then one way to prevent the flip on your computer is to setup the IP address in your /etc/hosts file.

That file has a list of IP and corresponding names. For example:

8.8.8.8       example.com

I often do that when I switch my DNS IP addresses since I usually have the caches setup for at least 1h and often 1 day (My IPs change rarely).

You can do the exact same thing under MS-Windows. The min problem is to find the /etc/hosts file. It's actually buried within the C:\Windows\system32\drivers directory (that directory changed slightly between versions of Windows, I think, but it's there at least in Win8 and Win10).

For a browser to pick up the new address, you may have to restart it. Browsers may also have caches as pointed out by @BaldockJa's answer.

Alexis Wilke

Posted 2012-08-01T23:46:21.763

Reputation: 447