CHECKLINK(1)
๐ checklink ๐
okay so bestie, this is CHECKLINK(1) โ the manual page for checklink, a.k.a. the W3Cยฎ Link Checker. Pull up a chair, we're doing link validity checks and it's giving iconic. โจ
๐ธ NAME ๐ธ
checklink โ check the validity of links in an HTML or XHTML document. ๐ซถ
๐ SYNOPSIS ๐
checklink [ options ] uri ...
๐ DESCRIPTION ๐
This manual page documents briefly the checklink command, a.k.a. the W3Cยฎ Link Checker.
checklink is a program that reads an HTML or XHTML document, extracts a list of anchors and links and checks that no anchor is defined twice and that all the links are dereferenceable, including the fragments. It warns about HTTP redirects, including directory redirects, and can check recursively a part of a web site. No cap, it's thorough.
The program can be used either as a command line tool or as a CGI script. ๐ปโจ
โจ OPTIONS โจ
okay so this program follows the usual GNU command line syntax, with long options starting with two dashes (-). A summary of options is included below.
-?,-h,--helpโ Show summary of options. ๐ซถ-V,--versionโ Output version information. โจ-s,--summaryโ Show result summary only. lowkey the TL;DR mode.-b,--brokenโ Show only the broken links, not the redirects. ๐-e,--dir-redirectsโ Hide directory redirects โ e.g.http://www.w3.org/TR->http://www.w3.org/TR/.-r,--recursiveโ Check the documents linked from the first one. recursion era.-D,--depth nโ Check the documents linked from the first one to depth n (implies--recursive).-l,--location uriโ Scope of the documents checked (implies--recursive). Can be specified multiple times in order to specify multiple recursion bases. If the URI of a candidate document is downwards relative to any of the bases, it is considered to be within the scope. If not specified, the default is the base URI of the initial document; for example, forhttp://www.w3.org/TR/html4/Overview.htmlit would behttp://www.w3.org/TR/html4/.-X,--exclude regexpโ Do not check links whose full, canonical URIs matchregexp. Note that this option limits recursion the same way as--exclude-docswith the same regular expression would.--exclude-docs regexpโ In recursive mode, do not check links in documents whose full, canonical URIs matchregexp. This option may be specified multiple times.--suppress-redirect URI->URIโ Do not report a redirect from the first to the second URI. The->is literal text. This option may be specified multiple times. Whitespace may be used instead of->to separate the URIs.--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. The->is literal text. This option may be specified multiple times. Whitespace may be used instead of->to separate the URIs.--suppress-temp-redirectsโ Do not report warnings about temporary redirects.--suppress-broken CODE:URIโ Do not report a broken link with the givenCODE.CODEis the HTTP response, or-1for robots exclusion. The:is literal text. This option may be specified multiple times. Whitespace may be used instead of:to separate theCODEand the URI.--suppress-fragment URIโ Do not report the given broken fragment URI. A fragment URI contains#. This option may be specified multiple times.-L,--languages accept-languageโ TheAccept-LanguageHTTP header to send. In command line mode, this header is not sent by default. The special valueautocauses a value to be detected from theLANGenvironment variable, and sent if found. In CGI mode, the default is to send the value received from the client as is.-c,--cookies cookie-fileโ Use cookies, load/save them incookie-file. The special valuetmpcauses non-persistent use of cookies, i.e. they are used but only stored in memory for the duration of this link checker run.-R,--no-refererโ Do not send theRefererHTTP header.-q,--quietโ No output if no errors are found. Implies--summary.-v,--verboseโ Verbose mode.-i,--indicatorโ Show progress while parsing as percentage of lines processed. No indicator is shown for documents containing no linefeeds.-u,--user usernameโ Specify a username for authentication.-p,--password passwordโ Specify a password for authentication.--hide-same-realmโ Hide 401's that are in the same realm as the document checked.-S,--sleep secsโ Sleep the specified number of seconds between requests to each server. Defaults to 1 second, which is also the minimum allowed.-t,--timeout secsโ Timeout for requests, in seconds. The default is 30.-C,--connection-cache numberโ Maximum number of cached connections. Using this option overrides theConnection_Cache_Sizeconfiguration file parameter; see its documentation below for the default value and more information.-d,--domain domainโ Perl regular expression describing the domain to which the authentication information (if present) will be sent. The default value can be specified in the configuration file. See theTrustedentry in the configuration file description below for more information.--masquerade "real-prefix surrogate-prefix"โ Perform a simple string substitution: URIs which begin with the stringreal-prefixare rewritten using thesurrogate-prefixbefore being dereferenced. Useful for making a local directory masquerade as a remote one. For example:
--masquerade "http://example.com/x/y/z/ file:///my/local/dir/"
If the document being checked contains a link to http://example.com/x/y/z/foo.html, then the local file system will be checked for file:///my/local/dir/foo.html.
--masquerade takes a single argument consisting of two URIs, separated by whitespace. The quote marks are not part of the argument, but one usual way of providing a value with embedded whitespace is to enclose it in quotes.
-H,--htmlโ HTML output.
๐๏ธ FILES ๐๏ธ
/etc/w3c/checklink.confโ The main configuration file. You can use theW3C_CHECKLINK_CFGenvironment variable to override the default location.
Trusted specifies a regular expression for matching trusted domains (ie. domains where HTTP basic authentication, if any, will be sent). The regular expression will be matched case insensitively against host names. The default behavior (when unset, that is) is to send the authentication information only to the host which requests it; usually you don't want to change this. For example, the following configures only the w3.org domain as trusted:
Trusted = \.w3\.org$
Allow_Private_IPs is a boolean flag indicating whether checking links on non-public IP addresses is allowed. The default is true in command line mode and false when run as a CGI script. For example, to disallow checking non-public IP addresses, regardless of the mode, use:
Allow_Private_IPs = 0
Forbidden_Protocols is a comma separated list of additional protocols/URI schemes that the link checker is not allowed to use. The javascript and mailto schemes are always forbidden, and so is the file scheme when running as a CGI script.
Forbidden_Protocols = javascript,mailto
Markup_Validator_URI and CSS_Validator_URI are formatted URIs to the respective validators. The %s in these will be replaced with the full "URI encoded" URI to the document being checked, and shown in the link checker results view in the online/CGI version. The defaults are:
Markup_Validator_URI =
http://validator.w3.org/check?uri=%s
CSS_Validator_URI =
http://jigsaw.w3.org/css-validator/validator?uri=%s
Doc_URI is a URI used for linking to the documentation, and CSS and JavaScript files in the dynamically generated content of the link checker. The default is:
Doc_URI = http://validator.w3.org/docs/checklink.html
Connection_Cache_Size is an integer denoting the maximum number of connections the link checker will keep open at any given time. The default is:
Connection_Cache_Size = 2
๐ฑ ENVIRONMENT ๐ฑ
checklink uses the libwww-perl library which has a number of environment variables affecting its behaviour. See "SEE ALSO" for some pointers.
W3C_CHECKLINK_CFGโ If set, overrides the path to the configuration file.
๐ฆ SEE ALSO ๐ฆ
The documentation for this program is available on the web at http://validator.w3.org/docs/checklink.html.
LWP, Net::FTP, Net::NNTP, Net::IP, perlre.
๐ AUTHOR ๐
This program was originally written by Hugo Haas <hugo@w3.org>, based on Renaud Bruyeron's checklink.pl. It has been enhanced by Ville Skyttรค and many other volunteers since. Use the <www-validator@w3.org> mailing list for feedback, and see http://validator.w3.org/docs/checklink.html#csb for more information.
This manual page was originally written by Frรฉdรฉric Schรผtz <schutz@mathgen.ch> for the Debian GNU/Linux system (but may be used by others).
๐ COPYRIGHT ๐
This program is licensed under the W3Cยฎ Software License, http://www.w3.org/Consortium/Legal/copyright-software.
okay that's the whole manual, bestie ๐ the footer has perl v5.42.3, dated 2021-06-17, and the page is CHECKLINK(1). You ate. ๐
โจ
๐ฆ where this page comes from
- nixos 26.05: perl5.42.3-W3C-LinkChecker 5.0.0
- nixpkgs unstable: perl5.42.3-W3C-LinkChecker 5.0.0
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms