Run a Traceroute on macOS
How to Run a Traceroute on macOS Using Terminal
If you are using macOS, you can use the Terminal application to run a traceroute and identify the network path that data takes from your Mac to a destination server.
A traceroute helps you understand how network traffic travels from your computer to a specific website or server. It displays the routers and network devices that your data passes through along the way.
Steps to Run a Traceroute on macOS
Step 1. Launch Terminal

Open Finder and navigate to:
Applications → Utilities → Terminal
You can also use Spotlight Search by pressing Command + Space, typing Terminal, and pressing Return.
Step 2. Enter the Traceroute Command

In the Terminal window, type the following command:
traceroute coolexample.com
Replace coolexample.com with the domain name you want to trace, including its extension, such as .com, .net, or .org.
Step 3. Press Return

Press Return on your keyboard to execute the command.
The traceroute process will begin, and the results will appear in the Terminal window.
Step 4. Understand the Traceroute Hops

Traceroute displays the network path between your Mac and the destination server.
Each numbered line represents a hop, which is a router or network device that forwards your traffic to the next destination.
The hops generally include:
Hop 1: Usually your local router or network gateway.
Intermediate Hops: Routers and network devices along the route taken by your traffic.
Final Hop: The destination server, if it responds to the traceroute probes.
Each hop typically displays the router's hostname or IP address and three response times in milliseconds (ms).
These response times indicate how long packets take to reach that hop and return to your Mac.
Note: If you see * * * for a hop, it means the router did not respond within the timeout period. This does not necessarily indicate a network problem because some routers block or deprioritize traceroute requests.
Step 5. Wait for the Traceroute to Complete

Wait until the traceroute process finishes.
The trace is complete when the destination is reached or the maximum hop limit is reached, which is typically 64 hops on macOS.
Keep in mind that the destination server may not respond even when your internet connection is working correctly.
Step 6. Copy the Traceroute Results

To copy the traceroute output:
Select the traceroute results in the Terminal window.
Right-click and select Copy.
Alternatively, press Command + C on your keyboard.
Step 7. Save the Traceroute Results

Open a text editor, such as TextEdit.
Create a new document.
Paste the copied traceroute results.
Select File → Save.
Enter a file name.
Choose a location on your Mac and save the file.
You have successfully run a traceroute on macOS and saved the results!
