Broken links and scripts
A link that leads to an error page, or a script the page asks for and never gets. Your visitors find these first, and few of them write to you about it.
What it is
Pages point at other pages, images and script files. A renamed page, a deleted image or a deploy that replaced the old build leaves addresses that answer 404 or 500.
Why it matters
A dead link ends the visit. A dead script can end the whole page: after a deploy, a cached page may ask for a file of the previous build, and an app that answers every address with its home page sends that page back where the browser expected code. The server says 200, the screen stays white.
How Tenty checks it
The check runs on every scan of a verified domain, after a deploy too.
- Scripts: Tenty asks for each script the page names and reports the ones that answer 404, 410 or 500 and up, or that come back as a web page. In browser mode, stylesheets, images and fonts that failed to load are reported as well.
- Links: Tenty collects the links and images on the page, the addresses in the sitemap and the links inside your scripts, and opens up to 60 of them, one at a time. A link found inside a script is marked as likely, since code can hold addresses nobody clicks.
Tenty opens addresses on your own host. It leaves out addresses with a query or a parameter, API paths, paths your robots.txt closes, and anything that sounds like an action: logout, delete, unsubscribe and their relatives. A link checker that unsubscribes your users would be a memorable bug.
Some apps answer every address with a page, single page apps mostly. There a dead link looks the same as a working one, so Tenty checks the scripts and says in the report that the links stay open.
A broken script on your own host is medium. A broken link, and a script from another host, is low.
How to fix it
For a link, point it at a page that exists, or redirect the old address to the new one. For a script, deploy the file the page asks for, or clear the cached page that still names an earlier build. Keep the files of the previous build around for a day, and the problem rarely starts.
How to reproduce
curl -sS -o /dev/null -w '%{http_code}\n' 'https://YOUR-APP/the-link'404, 410 or a number from 500 up is what the finding reports.