Traceroute

 

Overview

This article explains how to run the traceroute command on Windows, macOS, and Linux. This tool helps diagnose network connection issues between your computer and a server. For example:

  • Website slowness — Test the path to your website (example.com).
  • Email client timeouts — Test the path to your mail server (imap.dreamhost.com).

All commands in this article must be run on your local computer—not on your DreamHost server.

How to run the traceroute command

The following examples show how to run the traceroute command on various operating systems.

If you are able to connect, the IP address of the server and connection time (in milliseconds) displays.

If the connection fails, asterisks (***) display instead.

Windows

Windows uses the tracert command, while macOS and Linux use traceroute.

  1. Open the command prompt on your computer.
  2. Run the tracert command followed by your domain name or web server.
    C:\Users\DreamHost> tracert example.com
    
  3. Press Enter to run the tool and view connection results.

macOS

  1. Open the command prompt on your computer.
  2. Run the traceroute command followed by a domain or web server.
    [local]$ traceroute example.com  
  3. Press Enter to run the command and view the connection results.

Linux

For most Linux distributions, you'll need to first install the traceroute package.

  1. Open the command prompt on your computer.
  2. Install using sudo (in Ubuntu):
    [local]$ sudo apt-get install traceroute
    
  3. Run the traceroute command followed by a domain or web server.
    [local]$ traceroute example.com
    

    Some Linux distributions also require specifying the protocol using -I. For example:

    [local]$ traceroute -I ICMP example.com
    
  4. Press Enter to run the tool and view connection results.

How to copy and paste the results

If you’d like to share your results with DreamHost support, you'll need to paste them into a support ticket or chat.

Windows

Option 1 — Copy and paste to a file

  1. In the Windows command prompt, right-click and select Mark.
  2. Drag your mouse over the area you wish to copy.
  3. Right-click again to copy.
  4. Paste the results into a text editor or your support ticket.

Option 2 — Write to file

Alternatively, you can save the traceroute results directly to a text file by running the following command:

C:\Users\DreamHost> tracert example.com > C:\tracert.txt

This creates a file named tracert.txt within your C:\ directory.

macOS & Linux

Run the following command to write the traceroute results to a file named trace.txt. This example places the file under the user's home directory:

[local]$ traceroute example.com > /home/username/trace.txt

See also

DreamHost links

Third-party links

Did this article answer your questions?

Article last updated PST.

Still not finding what you're looking for?