Tracert Command: How to Traceroute on Windows, Mac & Linux

Key takeaway

Tracert (Windows) and traceroute (macOS and Linux) show every router between your computer and a destination, with three response times per hop. Run tracert example.com in Command Prompt or traceroute example.com in Terminal; add -d (Windows) or -n (Mac/Linux) to skip name lookups and get results faster. Asterisks or 'Request timed out' on a middle hop usually just mean that router ignores the probes. Timeouts that last to the end usually mean the destination drops tracert's probes, so check whether the site loads and trace again over TCP 443; what matters is latency or loss that carries through to the destination.

Check it now

Tracert command example on Windows showing each hop, three response times and a timed-out hop, with the traceroute command for Mac and Linux
Tracert command example on Windows showing each hop, three response times and a timed-out hop, with the traceroute command for Mac and Linux
Start reading
  1. What Is the Tracert Command?
  2. How to Run Tracert on Windows
  3. Tracert Command Options
  4. How to Run Traceroute on a Mac
  5. How to Run Traceroute on Linux
  6. How to Read Tracert Results
  7. How Tracert Works
  8. Tracert vs Traceroute vs Pathping vs MTR
  9. Run a Traceroute Online
  10. Tracert Command FAQ

What Is the Tracert Command?

Tracert (trace route) is a Windows command that shows the path your traffic takes to reach another host — every router ("hop") along the way and how long each one takes to answer. On macOS and Linux the same tool is called traceroute.

It's the tool to reach for when a website is slow or unreachable and you want to know where the problem is: on your own network, at your internet provider, somewhere in between, or at the destination. Where ping tells you whether a host answers, tracert tells you the route and where it breaks.

Trace a route from 8 cities now

How to Run Tracert on Windows

  • Press Windows + R, type cmd and press Enter (or search for Command Prompt).
  • Type tracert followed by a domain name or IP address, for example tracert example.com, and press Enter.
  • Wait. Tracert probes up to 30 hops, three times each, and waits up to 4 seconds for every reply — a clean trace finishes in seconds, but one full of timeouts can take several minutes. Press Ctrl + C to stop early, or use -d and -w (below) to speed it up.
text
C:\> tracert example.com

Tracing route to example.com [203.0.113.10]
over a maximum of 30 hops:

  1     1 ms    <1 ms    <1 ms  192.168.1.1
  2     9 ms     8 ms     9 ms  10.20.0.1
  3    12 ms    11 ms    12 ms  198.51.100.33
  4     *        *        *     Request timed out.
  5    24 ms    23 ms    24 ms  203.0.113.1
  6    25 ms    24 ms    24 ms  203.0.113.10

Trace complete.

Each line is one hop. The three numbers are three separate probes; the address on the right is the router that answered. Hop 1 is almost always your own router, and the last line is the destination. (The public addresses above come from the ranges reserved for documentation.)

Tracert Command Options

The syntax is tracert [options] target (Microsoft). The options you'll actually use:

OptionWhat it doesExample
-dDon't resolve IP addresses to hostnames — much fastertracert -d example.com
-h max_hopsMaximum number of hops (default 30)tracert -h 15 example.com
-w timeoutMilliseconds to wait for each reply (default 4000)tracert -w 1000 example.com
-4Force IPv4tracert -4 example.com
-6Force IPv6tracert -6 example.com

Combine them freely: tracert -d -w 1000 example.com gives the fastest useful trace. To save the result for your ISP or hosting support, redirect it to a file: tracert -d example.com > trace.txt.

Windows tracert has no port option: it always sends ICMP echo requests. To trace the way an HTTPS connection starts, over TCP port 443, use sudo traceroute -T -p 443 on Linux or in WSL, sudo traceroute -e -P TCP -p 443 on a Mac, or our online traceroute over TCP 443.

How to Run Traceroute on a Mac

Open Terminal (Applications › Utilities) and run traceroute example.com. macOS sends UDP probes by default; add -I to use ICMP like Windows does, which often gets answers from routers that ignore UDP. Useful options: -n (no name lookups), -m 30 (maximum hops; the macOS default is 64), -w 2 (seconds to wait per probe) and -q 1 (one probe per hop instead of three).

bash
traceroute -n -I example.com

How to Run Traceroute on Linux

Run traceroute example.com. If the command isn't found, install it (sudo apt install traceroute on Debian/Ubuntu, sudo dnf install traceroute on Fedora) or use tracepath, which is usually preinstalled. Linux traceroute sends UDP probes by default, 3 per hop, up to 30 hops.

OptionWhat it does
-nShow IP addresses only (no DNS lookups)
-IUse ICMP echo probes (like Windows tracert)
-TUse TCP SYN probes (default port 80) — gets through firewalls that block UDP/ICMP; needs sudo
-p portDestination port to probe, e.g. -T -p 443
-m max_ttlMaximum hops (default 30)
-q nProbes per hop (default 3)
-w secondsTime to wait for each reply
text
$ traceroute -n example.com
traceroute to example.com (203.0.113.10), 30 hops max, 60 byte packets
 1  192.168.1.1  0.612 ms  0.571 ms  0.534 ms
 2  10.20.0.1  8.911 ms  9.004 ms  8.872 ms
 3  * * *
 4  203.0.113.10  24.112 ms  23.980 ms  24.051 ms

To test the path to a web server the way an HTTPS connection starts, trace over TCP port 443: sudo traceroute -T -p 443 example.com.

How to Read Tracert Results

  • Timeouts on one middle hop, but later hops answer (* or "Request timed out"): normal. Many routers are configured to ignore or rate-limit these probes. The path is fine.
  • Timeouts from one hop to the end: nothing answers the probes after the last hop that replied. If the site still loads, the destination or a firewall in front of it is just dropping the probes: trace again over TCP 443 before blaming the route. If the site doesn't load either, note the last responding hop; that's the network to contact. In a browser, this usually shows up as ERR_CONNECTION_TIMED_OUT.
  • A latency jump that stays high for every later hop (for example 10 ms → 120 ms → 121 ms → 125 ms): the delay is real and starts at that hop — often a long-distance link or a congested network. A jump on one hop that drops back afterwards is just that router answering slowly and can be ignored.
  • "Destination host unreachable" or "Destination net unreachable" (!H or !N on Mac and Linux, !X when blocked on purpose): a router answered that it can't deliver the packets: "net" means it has no route to that network, "host" usually that the last router can't reach the host itself. Check the address; if it's right, the problem is at or after the router that reported it.
  • Private addresses (192.168.x.x, 10.x.x.x, 172.16–31.x.x) or shared 100.64–127.x.x addresses on the first hops: your own router, then your ISP's internal network. A slow hop 1 points to your Wi-Fi or router; a jump at the next hop, to the line to your ISP. If the trace dies there, start with Wi-Fi connected but no internet.
  • The trace ends at the destination with low times: the network path is healthy, so a slow website is more likely a server or DNS problem — check it with our DNS lookup and DNS speed test.

How Tracert Works

Every IP packet has a TTL (time to live) counter that each router lowers by one; when it reaches zero, the router drops the packet and sends back an ICMP "Time Exceeded" message. Tracert exploits this: it sends probes with TTL 1, then 2, then 3 and so on, so each router along the path reveals itself in turn, until the destination replies.

The operating systems use different probes. Windows tracert sends ICMP echo requests (the same packets as ping). macOS and Linux traceroute send UDP packets to high ports by default. Firewalls treat these differently, which is why the same trace can look different on Windows and Linux — and why the -I and -T options exist.

Tracert vs Traceroute vs Pathping vs MTR

ToolPlatformBest for
tracertWindowsQuick path check with ICMP probes
traceroutemacOS, LinuxPath check with UDP, ICMP (-I) or TCP probes (-T on Linux, -e -P TCP on a Mac)
pathpingWindowsRuns a trace, then measures packet loss at every hop for ~25 seconds per hop
mtrmacOS, Linux (and Windows via WinMTR)Live, continuously updating trace with loss and latency per hop
tracepathLinuxTraceroute without root that also discovers the path MTU

For intermittent problems, pathping (Microsoft) or mtr is better than a single tracert, because packet loss that only happens now and then won't show up in three probes.

Run a Traceroute Online

A trace from your own computer only shows the path from your network. To see whether a site is reachable from elsewhere, or to test without a terminal, run our online traceroute: it traces from 8 cities at once over ICMP, TCP 443 or UDP and shows each hop with its loss, location and network. Pair it with the Ping test to measure latency and packet loss, and IP Lookup to see who owns a hop's IP address.

Trace a route without a terminal

Run a traceroute to any domain or IP from 8 cities at once, over ICMP, TCP 443 or UDP, and see every hop with its loss, latency, network and location.

Sources

  1. tracert, Microsoft
  2. pathping, Microsoft
  3. traceroute(8), Linux man-pages

Tracert Command FAQ

How do I run tracert?

On Windows, open Command Prompt and type tracert followed by a domain or IP address, for example tracert example.com. On macOS or Linux, open Terminal and type traceroute example.com.

What does 'Request timed out' mean in tracert?

That hop didn't answer the probe within the timeout. If later hops still respond, the router is simply ignoring or rate-limiting tracert probes and there is no problem. If every hop after it times out but the site loads, the destination or a firewall in front of it is dropping the probes, not your traffic; if the site doesn't load either, the connection fails at that point.

What is the difference between tracert and traceroute?

They do the same job. Tracert is the Windows command and sends ICMP echo probes; traceroute is the macOS and Linux command and sends UDP probes by default, with options for ICMP (-I) or TCP (-T on Linux, -P TCP on a Mac).

What probe does tracert use on Windows?

ICMP Echo Request messages, the same packets as ping, with the TTL raised by one for each hop. Windows tracert can't send UDP or TCP probes or choose a port; traceroute on macOS and Linux sends UDP by default and can switch to ICMP or TCP.

How do I make tracert faster?

Use tracert -d to skip hostname lookups, and -w with a lower timeout such as tracert -d -w 1000 example.com. On Mac or Linux use traceroute -n.

Why do the asterisks (* * *) appear in traceroute?

Each asterisk is a probe that got no reply. Firewalls and routers often ignore traceroute probes, so asterisks on a single hop are usually harmless.

How many hops does tracert check?

Up to 30 hops by default. Change the limit with -h on Windows (tracert -h 15 example.com) or -m on Mac and Linux.

Can tracert show where my internet is slow?

Yes. Look for the first hop where latency jumps and stays high for every hop after it. A jump at hop 1 points to your own Wi-Fi or router; at the next hop, to the line between your modem and your ISP; later, to your ISP's network or the wider internet.

Is there an online tracert?

Yes. DNS Robot's online traceroute runs the trace from 8 cities at once, over ICMP, TCP 443 or UDP, so you can check a route without a terminal and from other places than your own network.

About the author

Shaik Vahid

Founder of DNS Robot. Vahid spent years in web hosting support fixing domains, DNS records, SSL certificates and email delivery for customers. He builds DNS Robot's tools and writes these guides from the errors people actually hit.

Traceroute

Trace the route to any website or IP from 8 cities, hop by hop, each network named