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.
- Open the command prompt on your computer.
- Run the tracert command followed by your domain name or web server.
C:\Users\DreamHost> tracert example.com
- Press Enter to run the tool and view connection results.
macOS
- Open the command prompt on your computer.
- Run the traceroute command followed by a domain or web server.
[local]$ traceroute example.com
- 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.
- Open the command prompt on your computer.
- Install using sudo (in Ubuntu):
[local]$ sudo apt-get install traceroute
- 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
- 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
-
- In the Windows command prompt, right-click and select Mark.
- Drag your mouse over the area you wish to copy.
- Right-click again to copy.
- 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