Skip to main content
  1. Home
  2. Knowledge Base
  3. Other
  4. How to Run a traceroute on Windows, Mac, or Linux

How to Run a traceroute on Windows, Mac, or Linux

A traceroute is a diagnostic test that you perform from your computer. The traceroute results display the path across the network (Internet) that data takes from your computer to a destination. Usually, that destination computer will be a webserver, and you’ll be using a traceroute to help determine why a website is slow or unresponsive.

When a website is slow or unresponsive, our first thought is to assume there is a problem with the webserver. While a problem on the webserver is certainly possible, it’s also just as likely that there is a problem somewhere on the path between your computer server itself. The traceroute can show you where the problem is.

First, we’ll explain how to do a traceroute (from Windows, Mac, or Linux), and then talk about what the results mean.

Windows

To do a traceroute on a Windows computer we’ll use the TRACERT utility.

  • Click the Windows icon and type “cmd.”
  • Click the “Command Prompt” link or icon.

Command Prompt

  • Type “tracert” followed by the domain name that you want to trace to. Hit the “Enter” key on your keyboard.
  • The traceroute will run and the results will be displayed.

traceroute results

Mac

Using Terminal

  1. Launch Terminal (/Applications/Utilities). You can also use the Spotlight Search function.
  2. Enter the word traceroute, followed by a space, then the domain name for which you want to run a traceroute and then hit enter.

Using Network Utility

  1. Launch Network Utility. You can access Network Utility
    • by searching with Spotlight. To do that, simply press Command and Space then type “Network Utility.”
    • by going to the CoreServices folder (/System/Library/CoreServices/Applications/). You may access this folder by going to Finder > Go > “Go to Folder…”.
  2. Select Traceroute
  3. Enter a domain name.
  4. Click Trace.

Linux

How you get to the traceroute utility on a Linux computer varies depending on which distribution you run. Generally speaking, you access it the same way you would access it on a Windows computer, by opening a command prompt.

You’ll usually type the full name, traceroute, rather than the Windows name, tracert. So for example:

# traceroute ggexample.com


If traceroute is not available in your Linus installation, you may have to install it.

Some Linux distributions require you to specify the protocol after -I:

# traceroute -I ICMP example.com

Making Sense of the Results

If GreenGeeks technical support has asked you to run a traceroute and send them the results, their diagnosis and conclusions may differ slightly from what we cover in this section. That’s because we are taking a high-level overview here and not going too deeply into the technical weeds. If you’re curious about the technical details of traceroute you can learn more about them here.

When your computer connects to a website, it travels a path that goes through several points, starting with your home router, then moving on to your ISP, then out onto the Internet. Your request will bounce through several computers (a.k.a. routers or gateways) along the way until it gets to the website’s local network (the web host’s data center) then finally to the server itself.

Each stop along the way is known as a “hop.”

Here’s how our example breaks down:

color-coded traceroute

So as you can see, the traceroute shows the path and the response times for each stop along the route. If there’s a connection problem anywhere along the way, you’ll see it in the response times.

Our demonstration traceroute doesn’t show any problems. Any response time of 150 ms or less is pretty standard for a traceroute where your computer and the webserver are in the same country.

A traceroute that has to travel to another country will often reflect the distance in increased response times.

Like this traceroute from my computer in California to a server in China:

traceroute from California to China

You can see that as soon as the connection hits the Internet, the response times are much slower. 100 ms is added to most hops. That is common when accessing servers on other continents. Response times up into the 300s are not unusual.

What You’re Seeing in Each Line of the Traceroute

Let’s break down one of the lines in our test trace to show you what kind of information is in there.

  • First is the hop number which is just the number of the hop on the route to the target server.
  • Next are the round trip times (in miliseconds) for your packets to reach the router and return to your computer. There are three round trip times because the traceroute sends three separate packets in order to show the consistency of the route.
  • Finally, the domain name and IP address of the router.

what the traceroute lines mean

Time Out! This Must Be the Problem!

Sometimes you’ll see a time out in the traceroute.

*    *    *    Request timed out.


That could mean that a router is down. Or it could mean that the router is configured not to return results to a traceroute. It could also mean that the router has a firewall enabled, or it is returning a time-out result for all the hops before it.

As I mentioned earlier, there are some deep technical weeds you can get lost in when interpreting traceroute results. Things are not always what they seem. “Request timed out” is one of those things that is not always what it appears.

The GreenGeeks support staff can usually determine whether the time out is a problem or not.

How to Copy and Paste Traceroute Results

If you’ve been asked to share your results with a support representative, you’ll need to paste them into your ticket.

Windows
Right-click inside the command prompt window and select “Mark.”

right click and select "mark"

Click and drag your mouse over the area you wish to copy.

click and drag over copy area

Hit the “Enter” key on your keyboard (or right-click in the title bar of the command prompt window and select Edit > Copy).

Now you can paste into a text file or support ticket.

You can also use this cool trick to write traceroute results to a text file. From the command prompt run:

tracert ggexample.com > C:\Users\mjp\Desktop\traceroute.txt


When I run this example, it performs the trace and writes the results to a file named traceroute.txt on the desktop of my computer.

You can change C:\ to any folder or path where you want to save the file.

You won’t get a confirmation that the command has completed, just a blank prompt.

run the command to create a text file

Mac or Linux
Similar to the Windows instructions above, you can run a command that outputs the results to a text file:

traceroute -I ggexample.com > /home/yourusername/traceroute.txt

Is There an Online traceroute Tool I Can Use?

Yes and no.

Generally speaking, you want to run a traceroute from your home computer. An online test can’t do that.

However – there are some online traceroute tests that can be useful. If users from other parts of the world are saying they are experiencing slowness or time outs on your site, running a traceroute from multiple locations can help you discover where the problem may be.

There are also some mobile apps that will run a traceroute from your phone. For example, Network Analyzer on an Android phone, or Nice Trace on an iPhone.

The rule of thumb is you want to run the traceroute from the computer you are using when you see a problem with a site.

Was this article helpful?

Need Support?
Can't find the answer you're looking for?
Contact Support

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.