Handling broken links

http://www.nynjtc.org/admin/reports/linkchecker lists all the broken links on the site. In addition when you visit a page which has broken links, they are shown in a yellow box at the top.

Some of these links are transiently broken and work if tried. If they work you can ignore them as the system will eventually notice and remove them from the broken links table.

Some local links are malformed, e.g.

 

The page http://www.nynjtc.org/content/old-trail-information is full of bad links that need to be fixed. It is a remnant of pre-Drupal.

Sometimes they are on pages or blocks that are not linked from anywhere so no one should find them, but search engines hang onto links for a long time so they may still reference those pages. Finding out whether they are not linked is complicated so just send the URLs of those to Walt or Bill if you can't figure out where they are linked from (particularly hard for blocks).

Both ways of reporting list an error code which hint at what is wrong. Here is a table of error codes and what to do about them.

Error Code Meaning Handling
404 Page is missing or transiently not found (try it and see which - maybe refresh several times to be sure) This is the dominant error. If on our site fix the link to point to the right page. If external look for where they moved the content and fix our link.
503 Server error

Usually goes away after the server is rebooted, but sometime for external sites the whole website goes away and it becomes a 404 error or maybe error 0.

Some of these are links to spam pages so the link needs to be deleted from our site and likely the whole content (usually a comment).

410 Page gone

Frequently for newspaper articles that the paper has hidden. Generally these are linked from the title of the article. Just remove the link and leave the title as that is better than nothing. For some papers it is possible to find the article at a different URL so replace it.

Some of these are links to spam pages so the link needs to be deleted from our site and likely the whole content (usually a comment).

303 Other See newspapers under 410
301  Moved permanently Ignore
0  php_network_getaddresses: getaddrinfo failed: Name or service not known Mostly website has gone away. Try to find equivalent information.
-1  Request timeout Ignore
-110  Connection timeout Ignore - Walt will handle