{"id":8487,"date":"2023-07-21T09:22:05","date_gmt":"2023-07-21T09:22:05","guid":{"rendered":"https:\/\/afreeurl.com\/?p=8487"},"modified":"2023-07-21T09:22:06","modified_gmt":"2023-07-21T09:22:06","slug":"301-redirect-or-404-error-pages","status":"publish","type":"post","link":"https:\/\/afreeurl.com\/?p=8487","title":{"rendered":"301 Redirect or &#8220;404 Error Pages&#8221;?"},"content":{"rendered":"<p><\/p>\n<p>Gary Illyes of Google answered a question about which is less worse to use, millions of 404 error pages or 301 redirects.  Gary&#8217;s answer cleared the air about how to think about each status code.<\/p>\n<p><strong>The question was simple:<\/strong><\/p>\n<p>&#8220;Which is less harmful: having millions of 404 error pages or millions of 301 redirects, where the product sold pages redirect to the main listing page?&#8221;<\/p>\n<p>The answer was also simple, although it could have gone into more detail.<\/p>\n<p><strong>Here is Gary&#8217;s response:<\/strong><\/p>\n<p>&#8220;404 status codes are completely harmless, and so is 301.<\/p>\n<p>You have to decide what&#8217;s best for your scenario and fly with it.&#8221;<\/p>\n<h2>Status codes<\/h2>\n<p>Gary uses the phrase &#8220;status codes&#8221; to refer to 404 and 301 responses.<\/p>\n<p>Both are responses from a server to a request from a web page (which was made by a browser or bot).<\/p>\n<p>When a browser goes to a web page, what it does is request a web page from the server.<\/p>\n<p>The server responds to the browser&#8217;s request with a message that communicates the status of that request.<\/p>\n<p>That&#8217;s why Gary called the 301 and 404 status codes.<\/p>\n<p>Since they are responses (from the server to the browser), they are also called response codes.<\/p>\n<p>But technically, they are status codes, because the creators of the HTML standards, the World Wide Web Consortium (W3C), <a href=\"https:\/\/www.rfc-editor.org\/rfc\/rfc9110.html#status.codes\" target=\"_blank\" rel=\"noopener\">they are referred to as status codes<\/a>.<\/p>\n<p><strong>There are five types of status codes:<\/strong><\/p>\n<p>&#8220;1xx (Informative): Request received, processing continued<\/p>\n<p>2xx (Success): The request was received, understood and successfully accepted<\/p>\n<p>3xx (Redirect): More action is required to complete the request<\/p>\n<p>4xx (Client Error): The request contains incorrect syntax or cannot be fulfilled<\/p>\n<p>5xx (Server Error): The server was unable to fulfill an apparently valid request&#8221;<\/p>\n<h2>Error Pages\/Error Codes<\/h2>\n<p>The question asked was about &#8220;404 error pages&#8221;, probably because it&#8217;s commonly called 404 errors.<\/p>\n<p>But the pages themselves are not wrong.<\/p>\n<p>What is happening is that the request for missing web pages &#8220;cannot be fulfilled&#8221;.<\/p>\n<p>There is an error where the page page is not found.  But the server just responds with a status code, 404 (page not found).<\/p>\n<p>The common use of the word &#8220;error&#8221; to refer to 404 has led to the mistaken belief that 404 responses are bad.<\/p>\n<p>But this is wrong, the 404 response is neither bad nor good, it is just a response that the page is not found.<\/p>\n<p><strong>According to the W3C:<\/strong><\/p>\n<p>&#8220;Status code 404 (Not Found) indicates that the origin server either did not find a current representation for the target resource or is unwilling to disclose that it exists.<\/p>\n<p>A 404 status code does not indicate whether this lack of representation is temporary or permanent;\u2026\u201d<\/p>\n<p>Another trusted and authoritative HTML resource, Mozilla Web Docs, <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/HTTP\/Status\/404\" target=\"_blank\" rel=\"noopener\">defines the 404 status code<\/a> like this:<\/p>\n<p>&#8220;The HTTP 404 Not Found response status code indicates that the server cannot find the requested resource.<\/p>\n<p>\u2026 A 404 status code only indicates that the resource is missing: not whether the absence is temporary or permanent.\u201d<\/p>\n<p>All of this explains why Gary Illyes said that &#8220;404 status codes are completely harmless&#8230;&#8221;<\/p>\n<h2>How to choose between 301 and 404 response code<\/h2>\n<p>Gary also said that the individual publisher should choose what works best for them.<\/p>\n<p>Web pages disappear for various reasons.<\/p>\n<p>If the page is missing because two sites have merged, a publisher can 301 redirect old or outdated pages to new pages that have a similar theme.<\/p>\n<p>But if the pages don&#8217;t have a similar topic match, those pages can become 404 responses, saying the page is absent.<\/p>\n<p>A 410 status code can be used to indicate that the removal is permanent, but Google basically treats 404 and 410 pretty much the same.<\/p>\n<p>In the end, when in doubt, think about what works best for the user.<\/p>\n<p>For example, if you&#8217;re merging a site that&#8217;s about topic K with a larger site that&#8217;s about topic A &#8211; Z, it might make sense to individually redirect to pages on the larger site that are about topic D.<\/p>\n<p>All other pages that do not have a one-to-one match can be redirected to the main category page of topic D on the larger site.<\/p>\n<p>Or as Gary said, &#8220;You have to decide what&#8217;s best for your scenario&#8230;&#8221;<\/p>\n<p><strong>Watch the Google SEO office hours at the 1:09 minute mark:<\/strong><\/p>\n<p class=\"vcont\"><iframe loading=\"lazy\" title=\"English Google SEO office-hours from July 2023\" width=\"760\" height=\"428\" src=\"https:\/\/www.youtube.com\/embed\/Y5Zq68cjnpM?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" allowfullscreen><\/iframe><\/p>\n<p>Featured image by Shutterstock\/Asier Romero<\/p>\n<\/p>\n<p>[ad_2]<br \/>\n<br \/><a href=\"https:\/\/www.searchenginejournal.com\/which-is-best-301-vs-404\/492256\/\" target=\"_blank\" rel=\"noopener\">Source link <\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Gary Illyes of Google answered a question about which is less worse to use, millions of 404 error pages or 301 redirects. Gary&#8217;s answer cleared the air about how to think about each status code. The question was simple: &#8220;Which is less harmful: having millions of 404 error pages or millions of 301 redirects, where the product sold pages redirect to the main listing page?&#8221; The answer was also simple, although it could have gone&#8230; <\/p>\n","protected":false},"author":1,"featured_media":8488,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-8487","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-seo-news"],"_links":{"self":[{"href":"https:\/\/afreeurl.com\/index.php?rest_route=\/wp\/v2\/posts\/8487","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/afreeurl.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/afreeurl.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/afreeurl.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/afreeurl.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=8487"}],"version-history":[{"count":1,"href":"https:\/\/afreeurl.com\/index.php?rest_route=\/wp\/v2\/posts\/8487\/revisions"}],"predecessor-version":[{"id":8489,"href":"https:\/\/afreeurl.com\/index.php?rest_route=\/wp\/v2\/posts\/8487\/revisions\/8489"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/afreeurl.com\/index.php?rest_route=\/wp\/v2\/media\/8488"}],"wp:attachment":[{"href":"https:\/\/afreeurl.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=8487"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/afreeurl.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=8487"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/afreeurl.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=8487"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}