↑ ↓ select, Enter open, Esc close

Show the number of redirects and the final URL

Adjust the values, the command updates live
user@server
curl -sL -o /dev/null -w 'Weiterleitungen: %{num_redirects}\nZiel: %{url_effective}\nStatus: %{http_code}\n' https://example.com/

Follows all redirects and prints only the summary: the number of hops, the final URL and the status code of the target page. More than one redirect costs crawl budget and load time, internal links and sitemaps should point directly to the final target.

Note: The entry on the redirect chain in the network category shows the individual intermediate steps. The output labels are German (“Weiterleitungen” means redirects, “Ziel” means target).

Also searched as

  • how many redirects does a url have
  • find final url after redirects
  • redirect chain too long
  • get effective url curl

Related one-liners

All in SEO checks

Read first, then run.

The commands on myline.de act directly on servers, files and databases. A wrong path or placeholder can delete data irreversibly or make a server unreachable.

  • All commands are provided without warranty and are not tested on every system.
  • Understand what a command does before running it, and check every placeholder.
  • Make a backup first and, if possible, try it on a test system.
  • You run commands at your own risk. Liability for damages is excluded to the extent permitted by law.