Check. Your. Links.
If you’re involved in the publication of content online, ask yourself one quick question: “are all my links OK?” If the answer is “no” or, worse, “I’m not sure” then please continue reading.
After all, hyperlinking is one of the defining characteristics of online content and, if you’re not taking full advantage of it, you’re not doing justice to the medium. There’s a lot to be said on the subject of ‘good linking’ in general, but I first want to address the more prosaic, straightforward aspect: do your links work?
- A non-existent domain: if your link targets an entire site that simply doesn’t exist — or has ceased to exist — your readers will see a browser-based error message along the lines of “can’t find the server” or “site can’t be reached”. This is bad, but not terrible: most readers will at least understand what’s going on, and simply return to your page, disappointed or slightly aggrieved. They may blame you, or some intangible entity representing the site they thought they were going to find.
- A non-existent page: typically, this will result in a
404error page which, if nicely presented, will have a similar response from your reader to a non-existent domain. However, in worse cases, the page you’ve linked to may appear to be okay, even when it isn’t. Some sites, for example, will redirect a
404page to another location such as their home page. If your reader thinks that’s what you intended all along, this can be a very confusing experience.
- Anything else that creates a poor impression: really, this covers an awful lot of possibilities which you may not have considered since they aren’t so obvious. For example, the page may be badly designed, it may contain content unsuitable for your audience, it may be very slow to load or display. It may exist but no longer contain the same content it did when you first linked to it.
If anything, I want to impress upon you that any of these problems may be present at any time during a link’s lifetime, which is often “from birth, indefinitely”. As writers, we’re all too used to dropping in a link and forgetting about it. Something should be done about that.
Here are three broad approaches which can be used:
This is the last-resort. If you’re not able or willing to do anything else, at least do this from time-to-time. Browse your site and click on links. Fix anything you find not to your liking, as soon as possible. If you can do this frequently, and you only have a relatively small site, such an approach can be perfectly viable.
Write some code
This is what programmers, such as myself, love to do, and there’s no shame in it! Remember, though, every bit of code you write carries responsibility with it — much like every URL you link to. Ask yourself if you are willing to maintain that code, and whether it is stable and secure enough to carry out the task at hand.
Some of the above problems — checking whether the link target actually exists, for example — are trivial to check. Others — whether the page is slow, or the content is accurate — prove more challenging. But solving some of those problems is betting than solving none of them.
When it comes to fetching remote URLs to verify them, a lot can go wrong. You’ll need to ensure that process cannot be abused or fail in such a way that would have catastrophic results. You’ll want to respect the policies of external sites such as the robots.txt protocol.
Use a service
You can go looking for a third-party tool or website which will handle the problem for you. You’ll find services such as these if you search for “website link checking” or similar:
And probably many more. Note that Google Search Console, despite the name, isn’t just about how your site appears within Google search results, it can help with things like broken links too.
Bear in mind that these services may cost, and they may be one small part of a larger toolset you require to keep your website in the best condition it can be.
Above all, start thinking about the pages you link to as part of your responsibility, alongside your content. Because, as far as your readers are concerned, they are.