Free tool · 301 redirect speed test

Compare two 301 redirects, side by side.

Both redirects are measured the same way: DNS, connection, TLS and time to first byte. Then run the same test yourself with one script.

RedirHub test redirect
vs
Runs
Measure from

Enter a second redirect and press Compare. Results appear here in a few seconds.

Reproduce it

Don't take our word for it.

The script runs the same measurement from your own machine with curl: a fresh connection every run, only the first response timed, the median reported.

  1. Download or copy the script.
  2. Run it in a terminal on macOS or Linux (on Windows, use WSL or Git Bash).
  3. Compare the medians with the result above.

Your numbers will differ from ours: they depend on where you run it and your network.

Download .sh
#!/usr/bin/env bash
# Compare how fast two redirects answer. Requires curl and awk.
# Usage: ./compare-redirects.sh [URL_A] [URL_B] [RUNS]
set -euo pipefail

A="${1:-https://redirhub.com/}"
B="${2:-https://example.com}"
RUNS="${3:-10}"

measure() {
  # Only the first response is timed (no redirect following), with a
  # fresh connection each run, so DNS, TCP and TLS are included.
  for _ in $(seq "$RUNS"); do
    curl -s -o /dev/null --max-redirs 0 --max-time 10 \
      -w '%{time_namelookup} %{time_connect} %{time_appconnect} %{time_starttransfer} %{http_code} %{redirect_url}\n' \
      "$1" || true
  done
}

report() {
  # Median of each phase, in milliseconds. curl's times are cumulative, so
  # connect and TLS are the differences between them, as on the web page.
  awk -v url="$1" '
    { dns[NR]=$1; tcp[NR]=$2-$1; tls[NR]=($3>0 ? $3-$2 : 0); ttfb[NR]=$4; code=$5; loc=$6 }
    function med(a,  n,i,j,t,b){ n=NR; for(i=1;i<=n;i++) b[i]=a[i]
      for(i=1;i<=n;i++) for(j=i+1;j<=n;j++) if(b[j]<b[i]){t=b[i];b[i]=b[j];b[j]=t}
      return (n%2 ? b[(n+1)/2] : (b[n/2]+b[n/2+1])/2) * 1000 }
    END {
      printf "%s\n  status %s -> %s\n", url, code, (loc==""?"(no Location)":loc)
      printf "  DNS %6.1f ms | connect %6.1f ms | TLS %6.1f ms | first byte %6.1f ms  (median of %d)\n",
        med(dns), med(tcp), med(tls), med(ttfb), NR
    }'
}

measure "$A" | report "$A"
measure "$B" | report "$B"
Run it with the two redirects above:
$ ./compare-redirects.sh https://redirhub.com https://example.com 10

Method

What the test measures

DNS

Looking up the redirect's domain.

Connect

Opening a TCP connection to the closest server.

TLS

The HTTPS handshake and certificate check.

Server wait

Until the 301 and its Location header arrive.

Only the redirect response is timed, not the destination page, so a slow destination does not count against the redirect. Hops are counted separately. The tool runs on Vercel Functions in Washington, D.C., Frankfurt and Tokyo, not on our redirect network, and alternates A and B on every run.

Frequently asked questions

redirhub.com is a real 301 served by RedirHub, from the same network as customer redirects. Replace it with any URL to compare two redirects of your own.
Both get the same number of runs from the same location, alternating A, B, A, B, each on a fresh connection, and we report the median. The test runs on Vercel, not on RedirHub's network, and the script lets you check it from your own.
From Vercel Functions in three regions: Washington, D.C. (iad1), Frankfurt (fra1) and Tokyo (hnd1). Pick one, or all three for a side-by-side table.
The timing covers the first response only. The hop count and final URL show the rest of the chain.
Distance to the server, your connection and DNS caching all change the numbers. Compare the gap between A and B, not the absolute values.