This is the tab in the Results Window where you can view the links contained in a document and check them for validity.
The Links tab in the Results Window
See also the Check Links topic for basic information about checking links.
A document must first be validated before the links will be displayed. This is because HTML Validator compiles the list of links during validation. If the validation is terminated early due to too many errors or warnings, then all the links contained in the document may not be listed.
To check the links to make sure that they exist and are valid, press the Check Links button ().
CSE HTML Validator integrated editor supports automatic link checking if enabled. This will cause HTML Validator to automatically check the links of any documents that are validated without having to press the Check Links button ().
By checking multiple links at a time and using a link cache, HTML Validator will efficiently check the links in the background so that you can continue to work. When the link check is completely finished, the results will be available and displayed if the Links tab is selected. If the Links tab is not selected, selecting the Links tab after a link check will display the most current link check results.
To abort a link check that is currently in progress, press the Stop Checking Links button in the Links tab. (this button looks like a "stop" button and is a square). Any links that are currently being checked will be checked, but no more unchecked links will be checked, so it may take a few seconds (or even a minute or two) for all link checking to stop after pressing this button.
For more information about link checking, please visit the Link Checking section in the Things You Should Know topic.
The 'Status' column will display the link status. Below are some possible status results, but there are more.
•200 - OK - The server reported HTTP status code 200, which means "OK". The link should be valid.
•404 - Not Found - The server reported HTTP status code 404, which means that the requested page couldn't be found on that server. Check to make sure the link is correct and includes the the correct folders and correct file extension (if any).
•can't resolve hostname to IP address - The DNS system could not translate the hostname (like www.domain.com) to an IP address. This is most likely because there is no such hostname.
•See also List of HTTP status codes (new window)
If a relative link is used in the document, then CSE HTML Validator will try to calculate its absolute URL. In order to do this, HTML Validator needs a base URL from which to compute the absolute URL. The base URL is obtained by the following:
•If the validated document has a filename or URL but not a "base href" attribute, then the full path to the filename or URL is used.
•If the document contains a "base href" attribute, then the value of the "href" attribute is used. "base href" has the highest priority when finding a base URL.
•If a base URL cannot be obtained, then the program will not be able to compute absolute URLs for relative paths.
To change the base URL used to calculate absolute URLs for relative URLs, add a "base" element in the "head" section of the document with an "href" attribute with the base. Example:
After the "base" element is added, revalidate the document to recompile and display the list of links.
If one or more of the links is redirected then CSE HTML Validator will tell you in the link status. This means that the server redirected the request to another URL or location. You should normally change your link so that it is not redirected, except in certain circumstances when you want the redirection.
To eliminate an unwanted redirection, find out what location the server is redirecting the URL to (check the comment column which will appear for redirected links) and change the URL so that it points directly to the redirected location.
A common reason for a redirected URL is when linking to a folder/directory. For example, to link to the directory "http://www.htmlvalidator.com/dir/", the link should be "http://www.htmlvalidator.com/dir/" and not to "http://www.htmlvalidator.com/dir". Note the missing forward slash on the end of the incorrect link. A missing slash on a directory link will normally cause an HTTP server to send a redirect to the correct URL that includes the slash. Another side effect of having a redirect is that it is slightly slower because of the extra overhead. The solution is to make sure that all directory links correctly end in a slash.