Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Some links on this page are affiliate links: if you buy through them we may earn a commission, at no extra cost to you.

Use DNS to find the public IP address a website hostname currently resolves to. On Windows, run nslookup example.com; on macOS or Linux, run dig example.com A and dig example.com AAAA. The first checks IPv4 records; the second pair checks IPv4 and IPv6. Replace example.com with the exact hostname you want to look up.

Start with the hostname, not the full URL

DNS looks up a hostname: the domain or subdomain between the protocol and the next slash. For example, from https://www.example.com/products/item?id=5, look up www.example.com. Leave out https://, the page path, query string and fragment.

Keep the exact hostname, including www or another subdomain. example.com and www.example.com can have different DNS records and resolve to different addresses.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

What the lookup returns

DNS translates names people can read into network addresses. An A record maps a hostname to an IPv4 address; an AAAA record maps it to an IPv6 address. A hostname can have several records, no direct address record, or a CNAME alias that points to another hostname. Resolvers often follow aliases when answering an address query. ICANN explains DNS, and Cloudflare documents DNS record types.

#1 Best Overall
Klein Tools VDV526-200 LAN Scout Jr Cable Tester Ethernet Cable Tester Kit
  • VERSATILE CABLE TESTING: Cable tester for data (RJ45) terminated cables and patch cords, ensuring comprehensive testing capabilities
  • LARGE BACKLIT LCD: Backlit LCD display enables easy reading of pin-to-pin wiremap results, even in low-lit areas
  • COMPREHENSIVE FAULT DETECTION: Test for Open, Short, Miswire, Split-Pair faults, Cross-over, and Shield, providing thorough fault detection
  • INTUITIVE USER INTERFACE: User-friendly interface with three buttons and simple, easy-to-identify test responses, ensuring a smooth testing experience
  • MULTIPLE TONE GENERATOR STYLES: Tone on a single wire, wire pair, or all 8 conductor wires using the multiple style tone generator (solid/warble); requires probe Cat. No. VDV500-123 (sold separately)

Find the IP address on Windows

  1. Open Command Prompt.

  2. Run nslookup example.com, replacing the example with your hostname.

  3. Read the returned address or addresses. To query only IPv4, run nslookup -q=A example.com; for IPv6, run nslookup -q=AAAA example.com.

Typical output shows the DNS server used, a name, and one or more address values. An answer labeled Non-authoritative answer is not an error: it generally means the response came from a recursive resolver or its cache rather than directly from the domain’s authoritative nameserver. See the nslookup.io command and output guide.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Find the IP address on macOS or Linux

  1. Open Terminal.

  2. Query IPv4 with dig example.com A and IPv6 with dig example.com AAAA.

  3. Look in the ANSWER SECTION. For just the returned addresses, use dig +short example.com A or dig +short example.com AAAA.

    Rank #2
    Sale
    Klein Tools VDV501-851 Scout Pro 3 Tester Starter Set Cable Tester
    • VERSATILE CABLE TESTING: Cable tester tests voice (RJ11/12), data (RJ45), and video (coax F-connector) terminated cables, providing clear results for comprehensive testing on unenergized Ethernet cables (not designed to test PoE)
    • EXTENDED CABLE LENGTH MEASUREMENT: Measure cable length up to 2000 feet (610 m), allowing for precise cable length determination
    • COMPREHENSIVE FAULT DETECTION: Test for Open, Short, Miswire, or Split-Pair faults, ensuring thorough fault detection and identification
    • BACKLIT LCD DISPLAY: Backlit LCD screen displays cable length, wiremap, cable ID, and test results, ensuring easy readability in various lighting conditions
    • EFFICIENT CABLE TRACING: Trace cables, wire pairs, and individual conductor wires using the multiple style tone generator (requires analog probe Cat. No. VDV500-123, sold separately), simplifying cable tracing tasks

If dig is unavailable on your Linux distribution, install the package provided by that distribution; package names and installation commands vary. The same dig commands are useful on macOS and Linux. nslookup.io’s guide shows the typical output location.

Use a browser-based DNS lookup

If you do not want to use a terminal, enter the hostname into a DNS lookup site and inspect its A and AAAA results. These tools provide a convenient way to copy the returned addresses:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

A command-line query is preferable when you need to choose the record type, compare resolvers or keep reproducible troubleshooting details. A browser tool is usually quicker for a one-time check.

Why a hostname can return several or changing addresses

More than one answer is not necessarily a problem. A site may publish separate IPv4 and IPv6 records, or use multiple addresses for redundancy, load balancing or a content delivery network (CDN). Geographic DNS and CDN routing can give users in different places different answers. Cloudflare notes that address records can map a hostname to one or more addresses in its record-type documentation.

DNS answers can also differ by resolver, location and time. Records change, and resolvers cache answers according to their TTL (time to live). TTL is expressed in seconds; Cloudflare gives 14,400 seconds, or 240 minutes, as an example A-record default, not a universal setting. Visibility of a change depends on the configured TTL and resolver behavior, so there is no guaranteed propagation time. See Cloudflare’s explanation of A records and TTL.

Rank #3
NOYAFA NF-8508 Network Cable Tester with Optical Power Meter
  • Multifunctional NOYAFA NF-8508 Network Cable Tester: There are nine features to meet your needs. Continuity Testing, Cable Scan, Port Flash, Length Measurement, POE Power Supply Test, QC testing, Optical Power Meter, VFL and NVC function.It is perfectly suited for various engineering cabling projects, network troubleshooting, network equipment maintenance and testing scenarios. Its precise cable scanning and fault localization capabilities help you effortlessly pinpoint the root cause of issues.
  • 7 WAVELENGTHS OPTICAL POWER METER: NF-8508 network cable tester can measure 7 standard wavelengths, 850/1300/1310/1490/1550/1625/1650, power detecting range(dBm): -70 ~ +10. Its power detection range spans from -70 dBm to +10 dBm, supporting FC/SC/ST connectors. It enables precise fiber optic power measurement, helping users efficiently assess fiber signal strength and ensure healthy fiber link operation. It effortlessly detects attenuation issues within fibers, thereby safeguarding fiber network stability.
  • High Efficiency Visual Fault Locator: Easy identification of fiber breakpoints, poor connections, bending or cracking. Excellent for finding the right fiber to splice or quickly finding a break. Emmiting Energy: standard wavelenth: 650nm. Fast flashing, slow flashing, high precison.The built-in self-calibration ensures stable long-term performance, and Class IIIa laser (output<5mW) ensures safe daily operation.
  • PORT FLASHING:The indicator light on the connection port in the NF-8508 device flashes to help accurately locate the cable. Displays port information, including operating speed, duplex mode, and negotiation settings. Port lights flash on the same screen to show the port's operating speed, making it easy to pinpoint lines and ports.
  • PoE Testing and Cable Length Test: PoE testing can check cable mapping polarity and voltage of PoE network switches, withstand 60VDC. Automatically detects and switches between 10M/100M/1000M modes, Includes cable tracking, short circuit test, interruption of circuit test and etc The RJ45 cable tester can quickly measure the length of the cable with a range of 200m. Not only network cables, but also phone lines and BNC cables.

For a useful record of a lookup, note the exact hostname, record type, resolver, date and time, and location if geographic routing may matter. A single result is a snapshot, not a permanent address for every visitor.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Check a DNS change or compare resolver answers

A normal lookup commonly asks a recursive resolver, which may return a cached answer. To compare answers from two public resolvers, query them directly:

  • dig @1.1.1.1 example.com A
  • dig @8.8.8.8 example.com A

This compares what those resolvers return; it does not establish a permanent or original server address. For a closer look at the published DNS zone, first list its nameservers with dig NS example.com, then query one of the returned authoritative nameservers: dig @ns1.example-dns-provider.com example.com A. Replace that nameserver with an actual name from your result. An authoritative query can help distinguish the zone’s current answer from a stale recursive cache. MxToolbox describes its DNS Lookup as querying the authoritative nameserver and its DNS Check as tracing delegation and querying nameservers individually.

To inspect whether a name is an alias, run dig example.com CNAME. The target is another hostname; resolving its address records can help explain the chain. Do not rely on dig example.com ANY to enumerate all DNS data: authoritative servers may limit, minimize or refuse these responses. Query the specific types you need, such as A, AAAA, CNAME or NS.

The returned IP may not be the website’s origin server

A DNS lookup tells you which public address the hostname currently resolves to. It does not necessarily identify the machine hosting the site’s application, the physical data center or the site owner. When a domain uses a reverse proxy or CDN, its public DNS answer may be an address belonging to that intermediary rather than the origin server. Cloudflare explains that its proxied records return Cloudflare IP addresses, while DNS-only records can expose an origin IP, in its guidance on exposed IP addresses. A protected origin may intentionally be concealed; a public lookup is not proof that it can or should be identified.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #4
Sale
iMBAPrice - RJ45 Network Cable Tester for Lan Phone RJ45/RJ11/RJ12/CAT5/CAT6/CAT7 UTP Wire Test Tool
  • Automatically runs all tests and checks for continuity, open, shorted and crossed wire pairs. Visible LED status display.
  • Cable state testing (2-wire): Line DC detecting, anode and cathode determination,Ringing signal detecting open, short and cross circuit testing
  • Cable Type: RJ11 Telephone cable and RJ45 LAN cable
  • Connectors: Ethernet Cat 5, Ethernet Cat 5e, Ethernet Cat 6, Ethernet Cat 7, RJ11 6P and RJ45 8P
  • Power Source: DC9V Battery Required (not included)

Many unrelated websites can also share one IP through virtual hosting. The server uses the requested hostname, and HTTPS also relies on hostname-based certificate and routing behavior, so entering a raw IP address in a browser may show another site or an error even when the domain works.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Troubleshoot missing or unexpected results

The lookup says NXDOMAIN or fails

Check for a typo and confirm that you queried the hostname, not a full URL. NXDOMAIN means the queried name was reported as nonexistent by the resolver; a timeout or server failure can instead indicate a resolver or network problem. Compare public resolvers with dig @1.1.1.1 example.com A and dig @8.8.8.8 example.com A. If they disagree during a recent change, obtain the nameservers with dig NS example.com and query one directly as described above.

No IPv4 address appears

Check the AAAA record as well. The hostname may be using IPv6, be an alias, or have no address record configured. A missing A answer alone does not establish that the hostname cannot resolve to an address.

The answer differs from an earlier lookup

Check whether the DNS record changed, whether you used a different resolver, and whether caching or geographic routing is affecting the response. A hostname routed through a CDN may return different public addresses by location.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

DNS resolves, but the website will not load

A successful DNS answer confirms name resolution, not that the site is reachable or functioning. The remaining issue may involve network connectivity, a firewall, TLS certificates or HTTPS configuration, the web server, or the application. Likewise, a raw IP opening the wrong site is not a reliable test of the hostname because servers can host many domains at the same address.

Best Value
Network Ethernet Cable Tester for LAN RJ45 RJ11 CAT5 CAT5E CAT6 CAT6A CAT7, Ethernet Wire Tester Tool UTP/STP Continuity Test for Telephone Line Finder Home Repair (HT812A)
  • Multi-Function Network Cable Tester: Supports RJ45 (CAT5, CAT5e, CAT6, CAT6A, CAT7) and RJ11 telephone cables. Quickly detects continuity, short circuits, open wires, miswiring, and cable shielding status, ensuring your LAN or phone lines are correctly wired and ready to use.
  • Fast/Slow Mode with LED Indicators: Switch between fast and slow scan speeds to identify wiring issues more precisely. LED lights on both master and remote units show wire order, making it easy to spot errors like open pairs or misaligned pins at a glance.
  • Split-Type Design for Long-Distance Testing: Master and remote units can be detached and used separately, allowing you to test both ends of a long cable run, ideal for wall-mounted ports, long runs, or structured cabling. Perfect for home, office, or professional IT setups.
  • Compact, Lightweight & Durable: Ergonomically designed with sturdy ABS housing, this pocket-sized tester is ideal for on-the-go network engineers, DIYers, and electricians. It’s your go-to toolkit for cable maintenance, upgrades, or new installations.
  • Safe & Easy to Use: Simple one-button operation makes testing quick and hassle-free. LED indicators clearly show wiring status, while the G light instantly identifies shielded (FTP/STP) or unshielded (UTP) cables. Supports safe testing of telephone lines with typical voltages under 48-72V, ideal for both home and professional use.

DNS lookup, nameserver lookup and registration lookup are different

Question

What to check

What public IPv4 or IPv6 address does this hostname resolve to?

A or AAAA DNS lookup

Which servers provide authoritative DNS for the domain?

NS lookup

Who registered the domain, or what registration data is available?

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

ICANN Lookup/RDAP, not an address lookup

What hostname is associated with an IP address through reverse DNS?

A reverse DNS PTR lookup; this is not guaranteed to identify every website using that IP

ICANN Lookup provides registration data for domains and Internet number resources through RDAP; it is useful for registration questions, not for finding the current web-serving address. See the ICANN Lookup FAQ and lookup listing. Similarly, an NS answer identifies DNS infrastructure, not the web server.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.