BROKEN LINKS AND HTTP ERROR CODES

Broken Links, as the words explain themselves, refer to the links/URL that are unavailable or under construction. There are many reason why the Users get error pages popped up due to these broken links. 404 Error, 500 internal server error, 403 error, unauthorized user error and many more. These are all because of broken links that are framed when error occur when the user wants to be redirected to a page that doesn’t exist. This concept has many names like Link Rot, Link dead, that is in simple language the target of reference does not exist.

This irritates many developers and on the other hand helps them giving the information where and what went wrong. But its developers who can understand but, what about the end users? They should get a valid information regarding what is wrong! For instance, 404 error, what does a user know about this? They should get valid response as page is not available or be navigated to some other default page.

There are many reasons for which a link breaks.

  • The most common reason is that the page is no more available.
  • Some websites also refresh the contents of their respective pages, this might lead to a break if the old contents are searched for.
  • Another reason is that if the targeted page hosted by the server changes, and relates to a new Domain name, then the browser would return a DNS error, or say content unavailable.
  • Dead links or Broken Links occur if the URLs are not organized & proper routing is not done.

To understand the Error, we need to know the Status codes that represent the type of error or success response. They are stated below:-

  • 100-199 : informational status
  • 200-299 : success status
  • 300-399 : redirection status
  • 400-499 : client errors
  • 500-599 : server errors

There are many ways to combat this, but we use XENU.

Xenu is a standalone desktop application for Windows that outputs all your site links, whether they’re valid or invalid links and groups them into a very readable fashion.Xenu’s link Sleuth checks Websites for broken links. Some of its features are:-

  • Can re-check broken links (useful for temporary network errors)
  • Simple, no-frills user-interface

  • Simple report format, can also be e-mailed
  • Executable file smaller than 1MB
  • Supports SSL websites (“https:// “)
  • Partial testing of ftp, gopher and mail URLs
  • Detects and reports redirected URLs
  • Site Map

These broken links need to be avoided as they have many drawbacks that may lead to huge losses to the website also as they would loose many customers.

Now lets discuss briefly about the various HTTP status codes, that is important during the development, so that the error can be notified and easily rectified. For instance, suppose Http status code 404 is returned, that simply means that the page referred by the user doesn’t exist & suppose the Http status code is 500(internal server error) this clearly states that there is problem in the called method or the service, that can be avoided debugging and getting to the root of the error.

HTTP 200 OK:-

The request for the page is processed successfully and the contents are returned or displayed to the user successfully. The users barely see this code as almost everytime a success page with the contents are displayed. Sometimes due to some internal problems the success code 200 is returned in place of the actual contents. This is the reponse from the server to the browser.

HTTP 404 NOT FOUND:-

This error code is self explanatory. As mentioned above , this suggests that the requested page doesnot exist or is unavailable. The server gives nothing in response, but ensures that the connection between client and server was made successfully. Another reason may be with the URL, so the user should be concious during writing the URL.

HTTP 500 INTERNAL ERROR:-

This error suggests that the web server got the request but was unable to process that request, this might be caused due to the problem on the server side and that should be avoided or referred to the server administrator or the developer to rectify the problem.

HTTP 503 SERVICE UNAVAILABLE:-

The reason for this error is almost same as the 500 internal error as the server receives the request from client but is unable to process the request. This might be due to unexpected failure at the web server administrator, increase in the subsequesnt/concurrent request from users.

HTTP 301 PERMANENTLY MOVED:-

The URL specified by the user might be moved to some other locations or have their domain names changed.Using a method HTTP Redirect, the user get redirected to the changed URL and the contents which the user was looking for.

HTTP 400 BAD REQUEST:-

The URL specified by the user must not be present or in developer’s language must not have been implemented, for which the request to the server here returns nothing i.e. Nothing was found as such. Thus, that is mentioned as a bad request, which is coded “404”.

 

Conclusion:-

Thus, here we discussed about the broken links and their causes and how a developer can avoid them from being shown or obstructing the users. This is also very much required for the testers to be aware of about this so that they can test and look for the broken links if any present.Broken Links being irritating for the users should always be avoided to ensure their retention. We also discussed about the different types of Http Error codes that are a part of every website.

3 thoughts on “BROKEN LINKS AND HTTP ERROR CODES

Leave a comment