Check HTTP status codes for a list of URLs
check status codes of multiple urls | bulk check redirects after relaunch | find 404 pages from url list | curl | http | seowhile read -r u; do printf '%s %s\n' "$(curl -o /dev/null -sS -w '%{http_code}' "$u")" "$u"; done < urls.txtReads the file line by line and fetches each URL with curl. It prints the status code and URL, so the list can be filtered further with sort or grep -v '^200'. Useful after a relaunch for checking old URLs for correct redirects and missing pages.
Note: Redirects are not followed, so a 301 is the desired result for old URLs. With -L in the curl call, the status of the target page appears instead.
Also searched as
- check status codes of multiple urls
- bulk check redirects after relaunch
- find 404 pages from url list