オンラインならばW3C Link Checkerのページへアクセスし、URLを入力するだけです。
Perlのパッケージとして提供されています。
CPANを利用してインストールします。
$ perl -MCPAN -e shell cpan> install W3C::LinkCheckerInstall it locally - W3C Link Checker Documentation
checklink options uris
$ checklink http://localhost/ -D 2
オプションの詳細は、helpで確認できます。
$ checklink --help W3C Link Checker version 4.81 (c) 1999-2011 W3C Usage: checklink <options> <uris> Options: -s, --summary Result summary only. -b, --broken Show only the broken links, not the redirects. -e, --directory Hide directory redirects, for example http://www.w3.org/TR -> http://www.w3.org/TR/ -r, --recursive Check the documents linked from the first one. -D, --depth N Check the documents linked from the first one to depth N (implies --recursive). -l, --location URI Scope of the documents checked in recursive mode (implies --recursive). Can be specified multiple times. If not specified, the default eg. for http://www.w3.org/TR/html4/Overview.html would be http://www.w3.org/TR/html4/ -X, --exclude REGEXP Do not check links whose full, canonical URIs match REGEXP; also limits recursion the same way as --exclude-docs with the same regexp would. --exclude-docs REGEXP In recursive mode, do not check links in documents whose full, canonical URIs match REGEXP. This option may be specified multiple times. --suppress-redirect URI->URI Do not report a redirect from the first to the second URI. This option may be specified multiple times. --suppress-redirect-prefix URI->URI Do not report a redirect from a child of the first URI to the same child of the second URI. This option may be specified multiple times. --suppress-temp-redirects Suppress warnings about temporary redirects. --suppress-broken CODE:URI Do not report a broken link with the given CODE. CODE is HTTP response, or -1 for robots exclusion. This option may be specified multiple times. --suppress-fragment URI Do not report the given broken fragment URI. A fragment URI contains "#". This option may be specified multiple times. -L, --languages LANGS Accept-Language header to send. The special value 'auto' causes autodetection from the environment. -c, --cookies FILE Use cookies, load/save them in FILE. The special value 'tmp' causes non-persistent use of cookies. -R, --no-referer Do not send the Referer HTTP header. -q, --quiet No output if no errors are found (implies -s). -v, --verbose Verbose mode. -i, --indicator Show percentage of lines processed while parsing. -u, --user USERNAME Specify a username for authentication. -p, --password PASSWORD Specify a password. --hide-same-realm Hide 401's that are in the same realm as the document checked. -S, --sleep SECS Sleep SECS seconds between requests to each server (default and minimum: 1 second). -t, --timeout SECS Timeout for requests in seconds (default: 30). -d, --domain DOMAIN Regular expression describing the domain to which authentication information will be sent (default: same host only). --masquerade "BASE1 BASE2" Masquerade base URI BASE1 as BASE2. See the manual page for more information. -H, --html HTML output. -?, -h, --help Show this message and exit. -V, --version Output version information and exit. See "perldoc LWP" for information about proxy server support, "perldoc Net::FTP" for information about various environment variables affecting FTP connections and "perldoc Net::NNTP" for setting a default NNTP server for news: URIs. The W3C_CHECKLINK_CFG environment variable can be used to set the configuration file to use. See details in the full manual page, it can be displayed with: perldoc checklink More documentation at: http://validator.w3.org/docs/checklink.html Please send bug reports and comments to the www-validator mailing list: www-validator@w3.org (with 'checklink' in the subject) Archives are at: http://lists.w3.org/Archives/Public/www-validator/