Quickly check status/error code of all hosted domains

To quickly check to http return code for a bunch of your hosted domains, enter this in bash:

for host in \
domain.com www.domain.com \
domain2.info www.domain2.info \
domain3.com www.domain3.com
do
  code=$(curl -k -sS -o /dev/null -w '%{http_code} %{redirect_url}' "https://$host/")
  printf "%-26s %s\n" "$host" "$code"
done

Comments

No comments yet. Why don’t you start the discussion?

Leave a Reply