{"id":24066,"date":"2008-11-27T00:00:00","date_gmt":"2008-11-27T00:00:00","guid":{"rendered":"https:\/\/alienroad.com\/google-bilgi-bankasi\/date-with-googlebot-part-ii-http-status-codes-and-if-modified-since\/"},"modified":"2008-11-27T00:00:00","modified_gmt":"2008-11-27T00:00:00","slug":"date-with-googlebot-part-ii-http-status-codes-and-if-modified-since","status":"publish","type":"ar_kb","link":"https:\/\/alienroad.com\/google-bilgi-bankasi\/date-with-googlebot-part-ii-http-status-codes-and-if-modified-since\/","title":{"rendered":"Date with Googlebot, Part II: HTTP status codes and If-Modified-Since"},"content":{"rendered":"<p class=\"gargardate\">Thursday, November 27, 2008<\/p>\n<p>\n  Our<br \/>\n  <a href=\"https:\/\/alienroad.com\/google-bilgi-bankasi\/first-date-with-the-googlebot-headers-and-compression\/\">date with Googlebot<\/a><br \/>\n  was so wonderful, but it&#8217;s hard to tell if we, the websites, said the right thing. We returned<br \/>\n  <code>301<\/code> permanent redirect, but should we have responded with <code>302<\/code> temporary<br \/>\n  redirect (so he knows we&#8217;re playing hard to get)? If we sent a few new <code>404<\/code> errors,<br \/>\n  will Googlebot ever call our site again? Should we support the header<br \/>\n  <code>If-Modified-Since<\/code>? These questions can be confusing, just like young love. So<br \/>\n  without further ado, let&#8217;s ask the expert, Googlebot, and find out how they judged our response<br \/>\n  (code).\n<\/p>\n<p><img decoding=\"async\" alt=\"googlebot\" lass=\"attempt-right\" src=\"https:\/\/alienroad.com\/wp-content\/uploads\/kb-gorsel\/g-6ba115ff7af9.jpg\" loading=\"lazy\"><\/p>\n<hr>\n<blockquote><p>\n  Dearest Googlebot,<br \/>\n  Recently, I did some spring cleaning on my site and deleted a couple of old, orphaned pages.<br \/>\n  They now return the <code>404<\/code> &#8220;Page not found&#8221; code. Is this ok, or have I confused you?<\/p>\n<p>  Frankie O&#8217;Fore\n<\/p><\/blockquote>\n<p>Dear Frankie,<\/p>\n<p><code>404<\/code> errors are the standard way of telling me that a page no longer exists. I won&#8217;t<br \/>\n  be upset&mdash;it&#8217;s normal that old pages are pruned from websites, or updated to fresher content.<br \/>\n  Most websites will show a handful of <code>404<\/code> errors in the Crawl Diagnostics over at<br \/>\n  Webmaster Tools. It&#8217;s really not a big deal. As long as you have good site architecture with<br \/>\n  links to all your indexable content, I&#8217;ll be happy, because it means I can find everything I need.\n<\/p>\n<p>\n  But don&#8217;t forget, it&#8217;s not just me who comes to your website&mdash;there may be humans seeing<br \/>\n  these pages too. If you&#8217;ve only got a very simple &#8216;404 page not found&#8217; message, visitors who<br \/>\n  aren&#8217;t as savvy could be baffled. There are lots of ways to make your <code>404<\/code> page more<br \/>\n  friendly; a quick one is our <code>404<\/code> widget over at Webmaster Tools, which will help<br \/>\n  direct people to content which does exist. For more information, you can read the blog post. Most<br \/>\n  web hosting companies, big and small, will let you customise your <code>404<\/code> page (and<br \/>\n  other return codes too).\n<\/p>\n<p>\n  Love and kisses,<br \/>\n  Googlebot\n<\/p>\n<blockquote><p>\n  Hey Googlebot,<br \/>\n  I was just reading your reply to Frankie above, and it raised a couple of questions.<br \/>\n  What if I have someone linking to a page that no longer exists? How can I make sure my visitors<br \/>\n  still find what they&#8217;re after? Also, what if I just move some pages around? I&#8217;d like to better<br \/>\n  organise my site, but I&#8217;m worried you&#8217;ll get confused. How can I help you?<\/p>\n<p>  Yours hopefully,<br \/>\n  Little Jimmy\n<\/p><\/blockquote>\n<p>Hello Jimmy,<\/p>\n<p>\n  Let&#8217;s pretend there are no anachronisms in your letter, and get to the meat of the matter.<br \/>\n  Firstly, let&#8217;s look at links coming from other sites. Obviously, these can be a great source of<br \/>\n  traffic, and you don&#8217;t want visitors presented with an unfriendly &#8216;Page not found&#8217; message. So,<br \/>\n  you can harness the power of the mighty redirect.\n<\/p>\n<p>\n  There are two types of redirect&mdash;<code>301<\/code> and <code>302<\/code>. Actually, there are<br \/>\n  lots more, but these are the two we&#8217;ll concern ourselves with now. Just like <code>404<\/code>,<br \/>\n  <code>301<\/code> and <code>302<\/code> are different types of responses codes you can send to users<br \/>\n  and search engine crawlers. They&#8217;re both redirects, but a <code>301<\/code> is permanent and a<br \/>\n  <code>302<\/code> is temporary. A <code>301<\/code> redirect tells me that whatever this page used<br \/>\n  to be, now it lives somewhere else. This is perfect for when you&#8217;re re-organising your site, and<br \/>\n  also helps with links from offsite. Whenever I see a <code>301<\/code>, I&#8217;ll update all references<br \/>\n  to that old page with the new one you&#8217;ve told me about. Isn&#8217;t that easy?\n<\/p>\n<p>\n  If you don&#8217;t know where to begin with redirects, let me get you started. It depends on your<br \/>\n  webserver, but here are some searches that may be helpful:\n<\/p>\n<ul>\n<li>\n    <b>Apache:<\/b><br \/>\n    <a href=\"https:\/\/www.google.com\/search?q=301+redirect+apache\" class=\"external-link\"><span>301 redirect apache<\/span><\/a>\n  <\/li>\n<li>\n    <b>IIS:<\/b><br \/>\n    <a href=\"https:\/\/www.google.com\/search?q=301+redirect+iis\" class=\"external-link\"><span>301 redirect iis<\/span><\/a>\n  <\/li>\n<\/ul>\n<p>You can also check your manual, or the README files that came with your server.<\/p>\n<p>\n  As an alternative to a redirect, you can email the webmaster of the site linking to you and ask<br \/>\n  them to update their link. Not sure what sites are linking to you? Don&#8217;t despair&mdash;my human<br \/>\n  co-workers have made that easy to figure out. In the &#8220;Links&#8221; portion of Webmaster Tools, you can<br \/>\n  enter a specific URL on your site to determine who&#8217;s linking to it.\n<\/p>\n<p>\n  My human co-workers also<br \/>\n  <a href=\"https:\/\/alienroad.com\/google-bilgi-bankasi\/webmaster-tools-shows-crawl-error-sources\/\">just released a tool<\/a><br \/>\n  which shows URLs linking to non-existent pages on your site.\n<\/p>\n<p>\n  Yours informationally,<br \/>\n  Googlebot\n<\/p>\n<blockquote><p>\n  Darling Googlebot,<br \/>\n  I have a problem&mdash;I live in a very dynamic part of the web, and I keep changing my mind about<br \/>\n  things. When you ask me questions, I never respond the same way twice&mdash;my top threads change<br \/>\n  every hour, and I get new content all the time! You seem like a straightforward guy who wants<br \/>\n  straightforward answers. How can I tell you when things change without confusing you?<\/p>\n<p>  Temp O&#8217;Rary\n<\/p><\/blockquote>\n<p>Dear Temp,<\/p>\n<p>\n  I just told little Jimmy that <code>301<\/code> redirects are the best way to tell a Googlebot<br \/>\n  about your new address, but what you&#8217;re looking for is a <code>302<\/code>.\n<\/p>\n<p>\n  Once you&#8217;re indexed, it&#8217;s the polite way to tell your visitors that your address is still the<br \/>\n  right one, but that the content can temporarily be found elsewhere. In these situations, a<br \/>\n  <code>302<\/code> (or the rarer <code>307<\/code> temporary redirect) would be better. For example,<br \/>\n  orkut redirects from <code>https:\/\/orkut.com<\/code> to<br \/>\n  <code>https:\/\/google.com\/accounts\/login?service=orkut<\/code>, which isn&#8217;t a page that humans would<br \/>\n  find particularly useful when searching for Orkut.\n<\/p>\n<p>\n  It&#8217;s on a different domain, for starters. So, a <code>302<\/code> has been used to tell me that all<br \/>\n  the content and linking properties of the URL shouldn&#8217;t be updated to the target&mdash;it&#8217;s just<br \/>\n  a temporary page.\n<\/p>\n<p>That&#8217;s why when you search for orkut, you see orkut.com and not that longer URL.<\/p>\n<p>Remember: simple communication is the key to any relationship.<\/p>\n<p>\n  Your friend,<br \/>\n  Googlebot\n<\/p>\n<blockquote><p>\n  Captain Googlebot,<br \/>\n  I am the kind of site who likes to reinvent herself. I noticed that the links to me on my friends&#8217;<br \/>\n  sites are all to URLs I got rid of several redesigns ago! I had set up <code>301<\/code><br \/>\n  redirects to my new URLs for those pages, but after that I <code>301<\/code> redirected the newer<br \/>\n  URLs to my next version. Now I&#8217;m afraid that if you follow their directions when you come to<br \/>\n  crawl, you&#8217;ll end up following a string of <code>301<\/code> redirects so long that by the end you<br \/>\n  won&#8217;t come calling any more.<\/p>\n<p>  Ethel Binky\n<\/p><\/blockquote>\n<p>Dear Ethel,<br \/>\n  It sounds like you have set up some URLs that redirect to more redirects to&#8230; well, goodness! In<br \/>\n  small amounts, these &#8220;repeat redirects&#8221; are understandable, but it may be worth considering why<br \/>\n  you&#8217;re using them in the first place. If you remove the <code>301<\/code> redirects in the middle<br \/>\n  and send me straight to the final destination on all of them, you&#8217;ll save the both of us a bunch<br \/>\n  of time and HTTP requests. But don&#8217;t just think of us. Other people get tired of seeing that same<br \/>\n  old &#8216;contacting&#8230;. loading &#8230; contacting&#8230;&#8217; game in their status bar.\n<\/p>\n<p>\n  Put yourself in their shoes&mdash;if your string of redirects starts to look rather long, users<br \/>\n  might fear that you have set them off into an infinite loop! Bots and humans alike can get<br \/>\n  scared by that kind of &#8220;eternal commitment.&#8221; Instead, try to get rid of those chained redirects,<br \/>\n  or at least keep &#8217;em short. Think of the humans!\n<\/p>\n<p>\n  Yours thoughtfully,<br \/>\n  Googlebot\n<\/p>\n<blockquote><p>\n  Dear Googlebot,<br \/>\n  I know you must like me&mdash;you even ask me for unmodified files, like my college thesis that<br \/>\n  hasn&#8217;t changed in 10 years. It&#8217;s starting to be a real hassle! Is there anything I can do to<br \/>\n  prevent your taking up my lovely bandwidth?<\/p>\n<p>  Janet Crinklenose\n<\/p><\/blockquote>\n<p>\n  Janet, Janet, Janet,<br \/>\n  It sounds like you might want to learn a new phrase&mdash; <code>304 (Not Modified)<\/code>. If<br \/>\n  I&#8217;ve seen a URL before, I insert an <code>If-Modified-Since<\/code> in my request&#8217;s header. This<br \/>\n  line also includes an HTTP-formatted date string. If you don&#8217;t want to send me yet another copy of<br \/>\n  that file, stand up for yourself and send back a normal HTTP header with the status<br \/>\n  <code>304 (Not Modified)<\/code>! I like information, and this qualifies too. When you do that,<br \/>\n  there&#8217;s no need to send me a copy of the file&mdash;which means you don&#8217;t waste your bandwidth,<br \/>\n  and I don&#8217;t feel like you&#8217;re palming me off with the same old stuff.\n<\/p>\n<p>\n  You&#8217;ll probably notice that a lot of browsers and proxies will say <code>If-Modified-Since<\/code><br \/>\n  in their headers, too. You can be well on your way to curbing that pesky bandwidth bill.\n<\/p>\n<p>\n  Now go out there and save some bandwidth!<br \/>\n  Good ol&#8217; Googlebot\n<\/p>\n<hr>\n<p>\n  Googlebot has been so helpful! Now we know how to best respond to users and search engines. The<br \/>\n  next time we get together, though, it&#8217;s time to sit down for a good long heart-to-heart with the<br \/>\n  robot (Date with Googlebot: Part III, is coming soon!).\n<\/p>\n<p class=\"byline-author\">As told to Chewy [Trewhella], Developer Advocate<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Thursday, November 27, 2008 Our date with Googlebot was so wonderful, but it&#8217;s hard to tell if we, the websites, said the right thing. We returned 301 permanent redirect, but should we have responded with 302 temporary redirect (so he knows we&#8217;re playing hard to get)? If we sent a few new 404 errors, will [&hellip;]<\/p>\n","protected":false},"menu_order":85790,"template":"","meta":{"footnotes":""},"ar_kb_kategori":[665],"ar_kb_etiket":[],"class_list":["post-24066","ar_kb","type-ar_kb","status-publish","has-post-thumbnail","hentry","ar_kb_kategori-blog"],"_links":{"self":[{"href":"https:\/\/alienroad.com\/wp-json\/wp\/v2\/ar_kb\/24066","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/alienroad.com\/wp-json\/wp\/v2\/ar_kb"}],"about":[{"href":"https:\/\/alienroad.com\/wp-json\/wp\/v2\/types\/ar_kb"}],"version-history":[{"count":0,"href":"https:\/\/alienroad.com\/wp-json\/wp\/v2\/ar_kb\/24066\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/alienroad.com\/wp-json\/wp\/v2\/media\/26653"}],"wp:attachment":[{"href":"https:\/\/alienroad.com\/wp-json\/wp\/v2\/media?parent=24066"}],"wp:term":[{"taxonomy":"ar_kb_kategori","embeddable":true,"href":"https:\/\/alienroad.com\/wp-json\/wp\/v2\/ar_kb_kategori?post=24066"},{"taxonomy":"ar_kb_etiket","embeddable":true,"href":"https:\/\/alienroad.com\/wp-json\/wp\/v2\/ar_kb_etiket?post=24066"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}