{"id":2045,"date":"2016-05-19T14:26:49","date_gmt":"2016-05-19T14:26:49","guid":{"rendered":"https:\/\/www.searchenginewatch.com\/2016\/05\/19\/beginners-guide-to-server-response-codes\/"},"modified":"2019-10-30T12:19:04","modified_gmt":"2019-10-30T12:19:04","slug":"beginners-guide-to-server-response-codes","status":"publish","type":"post","link":"https:\/\/searchenginewatch.com\/2016\/05\/19\/beginners-guide-to-server-response-codes\/","title":{"rendered":"Beginner\u2019s guide to server response codes"},"content":{"rendered":"<p><strong>Each time you visit a web page, a bureaucratic exchange takes place between your computer\u2019s web browser and a distant web server.<\/strong><\/p>\n<p>Your web browser (called the \u201cclient\u201d) begins the exchange by submitting a request to the web server for code, images, and other information.<\/p>\n<p>The web server, always on the alert, returns a tiny message that says, <em>\u201cI received your request and here is what you can expect in the next few moments.\u201d <\/em><\/p>\n<p>This tiny message, including a server response code, is helpful to both the waiting client and human beings optimizing the experience.<\/p>\n<p>Server response codes may appear to be errors at first glance; they&#8217;re most obvious when what the user wants to happen, doesn\u2019t. On deeper inspection, these informational codes exist for every properly functioning online interaction. Server response codes, also called status codes, are feedback that your website is built correctly and web server functioning as intended.<\/p>\n<h2>Status Code Ranges<\/h2>\n<p>A status code\u2019s leading number indicates its general meaning, making the codes predictable even if you don\u2019t know the details. Every career SEO ought to know these by heart.<\/p>\n<h3>2xx &#8211; Successful<\/h3>\n<p>The general goal is to send the client to a web page with this response code range.<\/p>\n<h3>3xx &#8211; Redirection<\/h3>\n<p>These frequently misunderstood response codes help update the client\u2019s outdated request.<\/p>\n<h3>4xx &#8211; Client Error<\/h3>\n<p>The request went wrong and the error is by the client. The most frequent response in this range is a broken link\u2014the client requests information not existing on the server.<\/p>\n<h3>5xx &#8211; Server Error<\/h3>\n<p>The request went wrong and the error is by the server. Fixing this generally requires developer intervention.<\/p>\n<h2>Typical Status Codes<\/h2>\n<p>A large number of status codes are reserved by consensus, so web professionals can share an understanding of standard responses. The codes below appear regularly when you\u2019re responsible for a website experience.<\/p>\n<h3>200 &#8211; OK<\/h3>\n<p>A 200 response from the server means,<em> \u201cEverything is great, and I\u2019m sending the information you requested.\u201d<\/em><\/p>\n<p>This response code is generally ideal. Every first time a web page loads in your browser, this is the code received. To a <a href=\"https:\/\/searchenginewatch.com\/2018\/05\/21\/no-need-for-google-12-alternative-search-engines-in-2018\/\">search engine <\/a>crawler, a 200 code says \u201cI want you to keep this link as-is in your index.\u201d<\/p>\n<p>How could this response be an error? A few weeks ago I was looking to buy a shirt. A specific brand ranked well in search results and I immediately found pages of product links from their site that fit what I wanted. I clicked on the first product link and landed on the correct page, but there was no way to choose options or buy the shirt.<\/p>\n<p>I went back to the search results and tried every link from that brand on the first page, with the same result.<\/p>\n<p>With some research, I found that their web server showed a 200 response for every page that ever existed on their site. Because of this, old products were not removed from the search index and outranked buyable products in search results.<\/p>\n<h3>301 &#8211; Redirect Permanently<\/h3>\n<p>A permanent redirect acknowledges the client\u2019s request and says, <em>\u201cThat information now resides somewhere else.\u201d<\/em><\/p>\n<p>Instead of loading the old information, the server begins an updated request\u2014a 301 response leads to a 200 response from the new location.<\/p>\n<p>If the client is a search engine, the requested location is replaced by the new location in a search index.<\/p>\n<p>A 301 response is ideal for correcting visitors who come to the wrong version of your domain, like non-www redirecting to www. This code is also great when you update and move content within your site. The idea is to make sure visitors to the old content are redirected to the updated content instead.<\/p>\n<p>This response code is an error when the old location is still relevant, should be indexed, and needs to retain indexing signals. It\u2019s also an error when the new location isn\u2019t relevant to the old location; misuse of redirects is a common spam indicator.<\/p>\n<h3>302 &#8211; Found\/Temporary Redirect<\/h3>\n<p>Temporary redirects acknowledge the client\u2019s request and say, <em>\u201cI found the information you want, but it\u2019s somewhere different at the moment.\u201d <\/em><\/p>\n<p>The server begins a new request, resulting in a 200 response from the new location. If the client is a search engine, the originally requested location is retained in a search index.<\/p>\n<p>Google\u2019s John Mueller has pointed out their algorithm does not penalize for 302 redirects, and the index will eventually treat a 302 as a 301 if it remains long enough. Likewise, a 301 response may be treated as a 302 by Google if there are enough signals to them that the old location is preferred.<\/p>\n<p>This response code causes problems when a link should lead to a permanent new location (301) or a not found (404) response instead. Some developers erroneously chain 302 and <a href=\"https:\/\/searchenginewatch.com\/2019\/05\/20\/seven-reasons-why-your-rankings-dropped-and-how-to-fix-them\/\">301 redirects<\/a> together, increasing a page&#8217;s load time with every redirect.<\/p>\n<h3>304 &#8211; Not Modified<\/h3>\n<p>The 304 status code redirects to a file previously cached by the client.<\/p>\n<p>The server says, <em>\u201cI have your request, but the information you want hasn\u2019t changed since the last time you asked for it. Let\u2019s not waste time; get the file you downloaded last time.\u201d <\/em><\/p>\n<p>This response code involves a lot of logic between the client and server in order to communicate how long cached information will be accurate. It can also indicate when cached information should be updated with a fresh download.<\/p>\n<p>This status code doesn\u2019t get nearly the attention its 3xx siblings do, but when you hear, \u201cPlease clear your cache to see the changes,\u201d or have a talk about cache expiration headings, 304 is your code. Balancing caching with fresh content is an art complicated enough to warrant its own article.<\/p>\n<h3>403 &#8211; Forbidden<\/h3>\n<p>A 403 response is the server saying, <em>\u201cI understand your request but I won\u2019t give you the information.\u201d <\/em><\/p>\n<p>This response is given when the client doesn\u2019t have the access level the server requires. It&#8217;s a correct response when an unauthorized client is attempting to access sensitive areas of a website. This status is usually sent to <a href=\"https:\/\/searchenginewatch.com\/2016\/02\/25\/say-goodbye-to-google-14-alternative-search-engines\/\">search engines<\/a> who try to crawl administration pages of a website.<\/p>\n<p>This status code is an error when you intend the client to access the information. This happens commonly with over-engineered <a href=\"https:\/\/searchenginewatch.com\/2019\/03\/12\/robots-txt-best-practice-guide-and-examples\/\">robots.txt<\/a> files, but can be the result of a misconfigured web server.<\/p>\n<h3>404 &#8211; Not Found<\/h3>\n<p>The server says, <em>\u201cI can\u2019t find that information, and it probably never existed.\u201d <\/em><\/p>\n<p>The most widely-recognized status code, a 404 serves the important function of informing the client that what it seeks does not exist.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-60162\" src=\"https:\/\/searchenginewatch.com\/wp-content\/uploads\/sites\/25\/2016\/05\/Page-not-found-.png\" alt=\"Page not found\" width=\"600\" height=\"313\" \/><\/p>\n<p>Some people are so convinced the 404 is a complete error that they\u2019ll go to great lengths to prevent a server from using it at all. They may redirect clients instead, leading to loops of links where the searcher never finds what they want as they follow a path that doesn\u2019t end.<\/p>\n<p>The 404 tells search engine crawlers that they\u2019ve found a dead end and should look to another location\u2014important when a crawler has limited resources to spend on a website.<\/p>\n<p>The 404 response is not usually an error with the server, but the result of outdated or mistyped links leading to that location. If you see multiple 404 results from internal site links, <a href=\"https:\/\/searchenginewatch.com\/2016\/02\/11\/fixing-404-error-pages-with-google-analytics\/\">fix the offending links immediately<\/a>. If you see multiple 404 results from external links that can\u2019t be updated, consider a 410 response instead.<\/p>\n<h3>410 &#8211; Gone<\/h3>\n<p>This status code is the server\u2019s way of saying, <em>\u201cThat information used to exist, but doesn\u2019t anymore.\u201d <\/em><\/p>\n<p>It tells search engine crawlers and other websites that the requested information was available only for a limited time, and they should remove their links to it.<\/p>\n<p>Search engine crawlers will continue to test a 404 page in case it\u2019s appearing in error, but a 410 response is regarded as absolute. Because of the 410 status code\u2019s specific meaning, developers often choose to prevent mistakes by returning a 404 for all \u201cnot found\u201d and \u201cgone\u201d instances.<\/p>\n<h3>503 &#8211; Service Unavailable<\/h3>\n<p>The 5xx range codes take more digging to fix, and function as actual server errors. The 503 status code is more common\u2014used when the server is overloaded and unable to respond to requests. The overload could be the result of misconfiguration, or a sudden and extreme increase in website traffic.<\/p>\n<p>5xx range codes like the 503 are always priority fixes; you can\u2019t optimize what clients can&#8217;t access.<\/p>\n<h2>In Summary<\/h2>\n<p>Server response codes are an important aspect of understanding the information sharing process. Knowing each code&#8217;s appropriate use is a necessary skill, even if it&#8217;s not your role to configure the server itself. The idea is to communicate exactly what you intend, and the correct configuration depends on your goals.<\/p>\n<p><strong><em>Aimee Jarboe advises mid-market retailers at Virid, an <a href=\"https:\/\/searchenginewatch.com\/2019\/10\/04\/tips-for-q4-ad-copy-and-messaging\/\">ecommerce<\/a> platform and services company. You can connect with Aimee on <a href=\"https:\/\/www.linkedin.com\/in\/aimeelj\">LinkedIn<\/a>.\u00a0<\/em><\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Server response codes are an important aspect of understanding the information sharing process. Knowing each code&#8217;s appropriate use is a necessary skill, even if it&#8217;s not your role to configure the server itself.<\/p>\n","protected":false},"author":1092,"featured_media":2046,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[1104,1578,1579,1580],"content_type":[27095],"class_list":["post-2045","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-seo","tag-301-redirect","tag-404-errors","tag-server-response-codes","tag-site-health","content_type-news"],"acf":{"tad_independentcommercial":false,"tad_content_format":false},"post_info":{"name":"idris.nagri@blenheimchalcot.com idris.nagri@blenheimchalcot.com","title":"","thumbnail_url":"https:\/\/searchenginewatch.com\/wp-content\/uploads\/2018\/10\/lego-404-page-120x90.jpg","category":"SEO","timeago":"10y"},"_links":{"self":[{"href":"https:\/\/searchenginewatch.com\/wp-json\/wp\/v2\/posts\/2045","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/searchenginewatch.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/searchenginewatch.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/searchenginewatch.com\/wp-json\/wp\/v2\/users\/1092"}],"replies":[{"embeddable":true,"href":"https:\/\/searchenginewatch.com\/wp-json\/wp\/v2\/comments?post=2045"}],"version-history":[{"count":0,"href":"https:\/\/searchenginewatch.com\/wp-json\/wp\/v2\/posts\/2045\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/searchenginewatch.com\/wp-json\/wp\/v2\/media\/2046"}],"wp:attachment":[{"href":"https:\/\/searchenginewatch.com\/wp-json\/wp\/v2\/media?parent=2045"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/searchenginewatch.com\/wp-json\/wp\/v2\/categories?post=2045"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/searchenginewatch.com\/wp-json\/wp\/v2\/tags?post=2045"},{"taxonomy":"content_type","embeddable":true,"href":"https:\/\/searchenginewatch.com\/wp-json\/wp\/v2\/content_type?post=2045"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}