ZOMDir > Blog

Monday 18 September 2017

How to fix broken links

When I detect a redirected or broken link with Broken Links at a Glance I follow in general the following steps:

  • Follow the link to analyse it 
  • Try another URL of the same site 
  • Try to contact the website owner
  • Search for an alternative webpage 
  • Remove the link


1. Follow the link to analyse it

Always follow the link to see what happens. 

When you got a 404 Page not found you might go to the next step.

When you link to a website that doesn't exist anymore you might get the error "Server not found". 

If that's the case and the HTTP error code wasn't 503 assume this link is broken and go to step 4 or depending on the situation to step 5. 

2. Try another URL of the same site

When you thought you linked to the homepage of a website and you got a 404 error then it is often easy to navigate to the new homepage of that website.

Update your webpage by replacing the old link with the new address of the homepage.

When you linked to a specific page, it could be that that information is still available at another location. 

So you have to search at that site for the same information. 

When found, you should update your webpage by replacing the old link with the new address. 

When not found, take the next step.

3. Try to contact the website owner

As you probably have experienced, websites aren't as static as you want. However that doesn't always mean that the information is gone. 

Due to a website reorganisation the information you want to link to might be at another address. 

When you are not able to find it yourself, you might contact the website owner. Almost every website has a contact information page. 

If you can't find an e-mail address you might try the e-mail address info@websitename.com.

Make clear that you linked to a webpage with information regarding ... and ask what the new address is for this information because the webpage you linked to has vanished.  

4. Search for an alternative webpage

Linking out is good practice, so I prefer and advise you to keep linking. 

When all previous steps failed search for another webpage with the information you want to link. 

Simple use your favorite search engine and hunt for the information you want to link to. 

Often you will find an alternative. 

When found, update your webpage by replacing the old link with the new address of the alternative webpage found. 

Otherwise, you should remove the link as described in the next step.

5. Remove the link

Too bad, the webpage you linked to doesn't exist anymore, and you can't find an alternative webpage to link to.

When that's the case you should update the webpage where you linked from and remove the link completely. 

Mind that this might have the consequence that you should rewrite your text.



That said, the process of fixing broken links is relative straightforward.  

For the best results, check your links at a regular base. For example every month.

Finally I like to tell you something about redirected links and broken links. 


Why check redirected links?

Redirected links are often indicated by the HTTP status code 301

In general a HTTP status code which has the format 3XX indicates a redirected link.

Often people think -incorrectly- that a redirected link isn't a problem. Okay, sometimes it isn't a problem, but sometimes it is. 

To find out you have to click these links to see where they redirect to.


From http to https

When the redirect is logical, for example from http:// to https:// it is advised to update your webpage with the redirected link by removing the old location (http://...) with the new location (https://...). 

By doing this, the next time you check your website for broken links, you have to check fewer redirected links.


Another system

It might happen that the website you link is using now another content management system with the side effect that old pages are redirected. When the redirect is logical update your webpage and replace the old location with the new location. However when the redirect isn't logical, then consider this as a broken link.


For sale or sold

It might happen that the website you link to is gone and a domain name speculant redirects your page to a "domain for sale landing page". You should consider this as a broken link. 

It might happen that the website you link to is now owned by someone else who works in a complete different business. In that case you should consider this as a broken link.


Hyjacked

It also might happen that the website you link to is hyjacked and is now selling shoes instead of ... whatever you where linking to. Also in this case you should consider this as a broken link. You might consider to warn the original website owner by sending a mail to info@websitename.com. Inform what you have discovered and ask polite to inform you when the website is restored so you are able to restore your link.



What are broken links?

Broken links are often indicated by the HTTP status code 404

However other status codes also might indicate a broken link. When the status code starts has the format 4XX or 5XX the link is probably broken.

I have experienced that websites which respond with a 408 or a 500 HTTP status code still might work although the may be a little slow. 

When that's the case you have to decide for yourself if you consider this as a broken link or not. 

When you link to a small website which probably doesn't get much visitors it might occur that the first time someone visits that website (the broken link checker) the response is slow while at a second visit (you checking the links marked as broken) the response is reasonable.

A website which responds with a 503 HTTP status code is in maintenance mode. You might ignore this broken link for the moment, however you might assume that in a few days that website will work.

Hope this helps,
Hans

--
ZOMDir.com is a dynamic directory and a wiki
Everyone is able to add a link in 10 seconds

To learn more view this Slideshare presentation