HTTP Error Code 400: Some Common Codes When Managing a Website

http error code 400HTTP error codes are a part of any website. As a site owner, you need to know the common ones. HTTP response codes 403, 404, and 410 are the most common codes when working with a website. These responses are not only good for your users, but they are also important for SEO (search engine optimization).

Trying to manage your first website? Take an Apache Web Server course at Udemy.com

What is a Server Response Code?

Every request made to your server returns a code. The server returns HTTP response codes to let bots and browsers know the result of the request. Servers often add other types of data in header information, but the response code is how bots and users handle the request.

The basic “good” response is a 200 response code. This code tells bots and browsers that the web page rendered without any issues. While this is the good result code, other codes are not necessarily “bad.” For instance, a 404 is not bad if you really meant to delete a page and no longer want it accessible to users. A 403 is not necessarily bad if you really want to protect data from unauthorized users.

A 403 Server Response

A 403 response deals with securing files or directories. As a site owner, you might have some secure sections of your site. You allow users to access only if they have the appropriate user name and password. This can be a user name and password you force the user to type when they enter your site or a user name and password that uses the network account. For instance, you can use domain credentials on a Windows environment to log in a user to a certain section of an intranet website.

Have a WordPress site? Learn to protect it from hackers at Udemy.com.

Another reason a 403 is returned is when you have directory browsing turned off. If you don’t have a default file set for the directory, the server tries to list all the files in the directory. This gives people a list of files even if you don’t want them to find them. With directory browsing turned off, you block bots and users from getting a list of files.

For SEO, a 403 blocks bots from indexing any content you don’t want in the search engines. This is especially important for sensitive content you don’t want in the search engines. Any data such as credit card or personal information should always require a password before search engines can crawl and index it.

404 Temporarily Not Found

When you delete a file from your website, the server automatically sets the file as a 404 response. This means that the file is temporarily deleted or just not there. 404 server response codes can be intentional or not, but they are typically the way you handle a missing file. If you have a site move and have new pages for your site, you would instead use a 301 response code, which forwards the 404 to the new page. This is the proper response when you need to move a page or redesign the page to a new file.

Contrary to popular belief, 404s do not harm your page search engine rank. Unless you accidentally delete a file that should be there and is important for your search traffic, a 404 does not hear any SEO or rank. Search engine bots will continue to crawl 404 pages, though. You should also consider the links passed to a 404 page. When links point to a 404 page, they do not pass PageRank, so you do lose that type of SEO.

Additionally, you should always have a custom 404 page for users. For instance, you might forget that you accidentally deleted a product. The user receives a 404. Instead of the useless default 404 page displayed by the server, a custom page helps the user find a viable, related product. This means you salvage the user and the sale. Custom 404 pages are especially important for ecommerce stores. They ensure that your users find product that they want instead of just bouncing to another site in the search engines.

410 for a Temporary Move

410 is slightly different than a 404 server response. A 410 response means the file is permanently gone. This doesn’t mean much to an end user. You should still have a 410 response custom page. Most website administrators don’t use 410 responses. However, you might want a page more quickly removed from search engines. A 410 response removes a page a bit more quickly than a 404. It can also help search engines to stop crawling the page, since its response basically means that you intend to remove the page and it’s permanently gone for good. A 410 has the same SEO effects as a 404 except with a 404 the search engines continue to crawl months after the page is gone.

These are just a few server response codes in the 400 range. These are the most common and the ones you need to know when you want to host and manage your own server.

You’ll need to know some other response codes as well. For instance, the 301 response code moves bots and users from one page to another, but so does the 302 response code.  A 302 response is a temporary redirect, so search engines can often index duplicate content. These little subtleties are important when you’re tasked with managing your own web server. Knowing response codes should be a part of the learning process, and you can learn a lot about managing a web server at Udemy.com.

Security, responses and SEO are all a part of responsibilities as a webmasters. You might understand how to work with these codes, but do you understand how these codes affect your SEO? HTTP response codes can make or break a site, so understand SEO at Udemy.com.

Finally, don’t forget to secure your server. Security protects your data including a 403 response, which is used for some basic security.  Udemy also has classes for basic website security, which will help you protect your site against hackers.