404 錯誤會對我的網站造成負面影響嗎?
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
2011 年 5 月 2 日 星期一
您正在思考自己的事情,使用網站管理員工具檢查自己的網站有多棒...等等!檢索錯誤網頁充滿了 404 (Not found)
錯誤!即將發生嚴重問題嗎?
別擔心,年輕的新手網站站長。我們來看看 404
錯誤,以及這些錯誤對網站造成 (或不會造成) 何種影響:
問:網站管理員工具回報的 404
錯誤是否會影響網站排名?
答:404
錯誤是網頁完全正常的部分,網際網路的瞬息萬變、新內容誕生、舊有內容終止,當內容終止,(理想狀況下) 會傳回 404
HTTP 回應代碼。搜尋引擎知道這一點。正如上文所示,我們自己的網站上也有 404
錯誤,整個網路上都能找到這些錯誤。事實上,我們確實「偏好」當您移除網站上的某個網頁時,請確保系統會傳回 404
或是 410
回應代碼 (而非soft
404
)。請注意,為了讓我們的檢索器能看到網址的 HTTP 回應代碼,檢索器必須要能檢索這類網址。如果網址遭到您的 robots.txt 檔案封鎖,我們就無法檢索該網址及查看其回應代碼。您的網站上有部分網址已不存在或傳回 404
錯誤不會影響您網站的其他網址 (傳回 200 (Success)
狀態碼的網址) 在 Google 搜尋結果中的表現。
問:404
錯誤完全不會對我的網站造成負面影響嗎?
答:如果您的網站上有部分網址發生 404
錯誤,這件事本身不會有負面影響,也不會損害您的網站在 Google 搜尋結果中的呈現情形。不過,也許基於其他原因您會希望處理特定類型的 404
錯誤。舉例來說,如果部分 404
網頁其實是您重視的網頁,請務必查看我們檢索時看到 404
錯誤的原因!如果您看見正式網址拼字錯誤 (例如將 www.example.com/awesome 打成 www.example.com/awsome),很可能是有人想要連結至您的網站,但純粹是打錯字。您可以透過 301
將拼錯的網址重新導向至正確的網址,獲得該連結的流量,而不必傳回 404
。此外,您也可以確保使用者到達您網站的 404
網頁後,能看到有用的資訊,協助他們找到所需內容,而不只是顯示「404
找不到」。
問:我想進一步瞭解「soft 404
錯誤」。
答:soft 404
是指網路伺服器針對不存在的網址傳回 404
(或 410
) 以外的回應代碼的情況。常見的例子是,網站擁有者希望傳回 404
網頁時一併為使用者提供實用資訊,而且認為如果要向使用者提供內容,就必須傳回 200
回應代碼。但事實並非如此!您可以在傳回 404
回應代碼的同時,一併提供您想提供的內容。再舉一個例子,網站會將任何未知的網址都重新導向至首頁,而不是傳回 404
錯誤。無論是哪一種情況,對於我們理解您的網站及建立索引作業造成造成負面影響,因此請確保您的伺服器針對不存在的內容傳回適當的回應代碼。提醒您,即使網頁顯示「404
找不到」也不代表系統會確實傳回 404
HTTP 回應代碼,請使用網站管理員工具中的 Googlebot 模擬器功能仔細確認。如果您不知道如何設定伺服器傳回正確的回應代碼,請參閱網站代管商的說明文件。
問:如何判斷網址應是 404
、301
或 410
?
答:當您從網站移除網頁時,請考慮是否要將這些內容移至其他位置,或者您是否再也不需要將這類資料留在網站上。如果您要將該內容移至新網址,請使用 301
將舊網址重新導向至新網址。這樣一來,當使用者前來舊網址尋找內容時,伺服器即可自動將他們重新導向至相關網頁。如果您要完全移除這些內容,並且網站上也沒有相似內容可滿足使用者需求,則應針對舊網址傳回 404
或 410
。目前 Google 處理 410 (Gone)
與 404 (Not found)
的方式相同,因此無論您是傳回哪一個都差別不大。
問:我大多數的 404
錯誤都是針對我的網站上不存在的奇怪網址。
這是怎麼回事?這些網址的來源為何?
答:如果 Google 在網路上找到指向您網域網址的某個連結,可能會嘗試檢索該連結 (無論內容是否確實存在)。如果 Google 嘗試檢索但找不到內容,您的伺服器「應該」會傳回 404
。這類連結的產生原因,可能是因為某人連結至您網站時拼寫錯誤 (例如由 CMS 等自動產生的連結)、或由於 Google 不斷加強辨識,以及檢索嵌入 JavaScript 或其他內嵌內容的連結,因此而造成連結錯誤;或者,也可能是我們在進行快速檢查時,為了瞭解您的伺服器如何處理不明網址的而採取的行動。如果網站管理員工具針對不存在於您網站的網址回報 404
錯誤,可以放心忽略這些網址。我們並不知道哪些網址對您來說很重要,以及哪些應該是 404
,因此我們會顯示「所有」在您網站上找到的 404
錯誤,讓您自行決定重要與否。
問:有人抓取我的網站內容,並在過程中造成多項 404
錯誤。這些都是內含其他程式碼的「實際」網址,例如 https://www.example.com/images/kittens.jpg" width="100" height="300" alt="kittens"/>
,這是否會對我的網站產生負面影響?
答:一般來說,您不用擔心這類「無效連結」的問題對網站造成損害。我們瞭解網站擁有者幾乎無法防範其他人抓取網站內容,或是以不尋常的方式連結網站。如果您很熟悉規則運算式,可以考慮將這些網址重新導向,但基本上這種情況沒必要擔心。提醒您,如果您認為有人竊取您網站上的原始內容,也可以提出下架要求。
問:上週我修正了網站管理員工具回報的所有 404
錯誤,但我的帳戶中目前仍列出這些問題。這是否表示我沒有正確修正?要多久才會消失?
答:請查看「檢索錯誤」頁面中的「已偵測到」欄,這是系統最近一次偵測到錯誤的日期。如果該欄中的日期早於您修正錯誤的日期,代表自該日期以來我們尚未遇到這些錯誤。如果日期較近,則表示 Google 在檢索時仍持續看到 404
錯誤。
完成修正後,您可以透過 Googlebot 模擬器檢查檢索器是否看到新的回應代碼。測試幾個網址後,如果檢查結果良好,這些錯誤應該很快就會從檢索錯誤清單中消失。
問:我可以使用 Google 的網址移除工具,讓 404
錯誤迅速從帳戶中消失嗎?
答:不行;網址移除工具會從 Google 搜尋結果中移除網址,但不會從網站管理員工具帳戶中移除網址。該工具專為緊急移除要求而設計,而且網址已經傳回 404
的情況沒有必要使用該工具,因為這類網址會隨時間自然從搜尋結果中消失。請參閱這篇網誌文章的下半部,進一步瞭解網址移除工具適用與不適用的情形。
想進一步瞭解 404
錯誤嗎?歡迎前往我們的網誌查看 404
週相關資料,或到網站管理員說明論壇逛逛。
發文者:網站管理員趨勢分析師 Susan Moskwa
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
[null,null,[],[[["\u003cp\u003e404 errors on your site generally do not negatively impact your site's search ranking in Google.\u003c/p\u003e\n"],["\u003cp\u003eSoft 404 errors, where a page displays a 404 message but returns a success code like 200, can negatively impact your site's indexing and should be addressed.\u003c/p\u003e\n"],["\u003cp\u003eIf you move content to a new URL, implement a 301 redirect to guide users and search engines to the correct location.\u003c/p\u003e\n"],["\u003cp\u003eYou can safely ignore 404 errors for URLs that never existed on your site, as Google might crawl linked URLs regardless of their existence.\u003c/p\u003e\n"],["\u003cp\u003eGoogle's URL removal tool is not designed for removing 404 errors from Webmaster Tools but rather for removing specific URLs from search results.\u003c/p\u003e\n"]]],["`404` errors are normal and don't directly harm a site's search ranking. Ensure old content returns a `404` or `410` code, and redirect misspelled URLs with `301` to capture traffic. Soft `404` errors, where a non-404 code is used for non-existent pages, should be avoided. If content is moved, use `301` redirects; otherwise, use `404` or `410`. Ignore `404` errors for URLs that never existed. Fixing errors can be confirmed using \"Fetch as Googlebot.\" The URL removal tool doesn't affect Webmaster Tools' error reports.\n"],null,["# Do 404 errors hurt my site?\n\nMonday, May 02, 2011\n\n\nSo there you are, minding your own business, using Webmaster Tools to check out how awesome your\nsite is... but, wait! The\n[Crawl errors](https://support.google.com/webmasters/answer/7440203)\npage is full of\n[`404 (Not found)` errors](/search/blog/2008/08/its-404-week-at-webmaster-central)!\n*Is disaster imminent??*\n\n\nFear not, my young padawan. Let's take a look at `404` errors and how they do (or do\nnot) affect your site:\n\n\n**Q: Do the `404` errors reported in Webmaster Tools affect my site's ranking?** \n\nA: `404` errors are a perfectly normal part of the web; the Internet is always\nchanging, new content is born, old content dies, and when it dies it (ideally) returns a\n`404` HTTP response code. Search engines are aware of this; we have `404`\nerrors on our own sites, as you can see above, and we find them all over the web. In fact, we\nactually *prefer* that, when you get rid of a page on your site, you make sure that it\nreturns a proper `404` or `410` response code (rather than a `soft\n404`). Keep in mind that in order for our crawler to see the HTTP response code of a\nURL, it has to be able to crawl that URL---if the URL is blocked by your robots.txt file we won't be\nable to crawl it and see its response code. The fact that some URLs on your site no longer exist or\nreturn `404` errors does not affect how your site's other URLs (the ones that return\n[`200 (Success)`\nstatus codes](https://en.wikipedia.org/wiki/List_of_HTTP_status_codes)) perform in our search results.\n\n\n**Q: So `404` errors don't hurt my website at all?** \n\nA: If some URLs on your site `404`, this fact alone does not hurt you or count against\nyou in Google's search results. However, there may be other reasons that you'd want to address\ncertain types of `404` errors. For example, if some of the pages that\n`404` are pages you actually care about, you should look into why we're seeing\n`404` errors when we crawl them! If you see a misspelling of a legitimate URL\n(www.example.com/awsome instead of www.example.com/awesome), it's likely that someone intended to\nlink to you and simply made a typo. Instead of returning a `404`, you could\n`301` redirect the misspelled URL to the correct URL and capture the intended traffic\nfrom that link. You can also make sure that, when users do land on a `404` page on\nyour site, you\n[help them find what they were looking for](/search/docs/crawling-indexing/http-network-errors#pagegone)\nrather than just saying \"`404` Not found.\"\n\n\n**Q: Tell me more about \"`soft 404` errors.\"** \n\nA: A\n[`soft 404`](/search/docs/crawling-indexing/http-network-errors#soft-404-errors)\nis when a web server returns a response code other than `404` (or `410`) for\na URL that doesn't exist. A common example is when a site owner wants to return\n[a pretty `404` page with helpful information for their users](/search/blog/2008/08/make-your-404-pages-more-useful),\nand thinks that in order to serve content to users, they have to return a `200`\nresponse code. Not so! You can return a `404` response code *while* serving\nwhatever content you want. Another example is when a site redirects any unknown URLs to their\nhome page instead of returning `404` errors. Both of these cases can have negative\neffects on our understanding and indexing of your site, so we recommend making sure your server\nreturns the proper response codes for nonexistent content. Keep in mind that *just because a\npage **says** \"`404` Not Found,\" doesn't mean it's actually returning a\n`404` HTTP response code* ---use the\n[Fetch as Googlebot](https://www.google.com/support/webmasters/bin/answer.py?answer=158587)\nfeature in Webmaster Tools to double-check. If you don't know how to configure your server to\nreturn the right response codes, check out your web host's help documentation.\n\n\n**Q: How do I know whether a URL should `404`, or `301`, or\n`410`?** \n\nA: When you remove a page from your site, think about whether that content is moving somewhere\nelse, or whether you no longer plan to have that type of content on your site. If you're moving\nthat content to a new URL, you should `301` redirect the old URL to the new URL---that\nway when users come to the old URL looking for that content, they'll be automatically redirected\nto something relevant to what they were looking for. If you're getting rid of that content\nentirely and don't have anything on your site that would fill the same user need, then the old URL\nshould return a `404` or `410`. Currently Google treats\n`410 (Gone)` the same as `404 (Not found)`, so it's immaterial to us whether\nyou return one or the other.\n\n\n**Q: Most of my `404` errors are for bizarro URLs that never existed on my site.\nWhat's up with that? Where did they come from?** \n\nA: If Google finds a link somewhere on the web that points to a URL on your domain, it may try to\ncrawl that link, whether any content actually exists there or not; and when it does, your server\n*should* return a `404` if there's nothing there to find. These links could be\ncaused by someone making a typo when linking to you, some type of misconfiguration (if the links\nare automatically generated, for example, by a CMS), or by Google's increased efforts to recognize\nand crawl links embedded in JavaScript or other embedded content; or they may be part of a quick\ncheck from our side to see how your server handles unknown URLs, to name just a few. If you see\n`404` errors reported in Webmaster Tools for URLs that don't exist on your site, you\ncan safely ignore them. We don't know which URLs are important to you vs. which are supposed to\n`404`, so we show you *all* the `404` errors we found on your site and\nlet you decide which, if any, require your attention.\n\n\n**Q: Someone has scraped my site and caused a bunch of `404` errors in the\nprocess. They're all \"real\" URLs with other code tacked on, like\n`https://www.example.com/images/kittens.jpg\" width=\"100\" height=\"300\" alt=\"kittens\"/\u003e`\nWill this hurt my site?** \n\nA: Generally you don't need to worry about \"broken links\" like this hurting your site. We\nunderstand that site owners have little to no control over people who scrape their site, or who\nlink to them in strange ways. If you're a whiz with the\n[regex](https://www.google.com/search?q=define:regex),\nyou could consider\n[redirecting these URLs](/search/docs/crawling-indexing/301-redirects), but generally\nit's not worth worrying about. Remember that you can also file a\n[takedown request](https://www.google.com/dmca)\nwhen you believe someone is stealing original content from your website.\n\n\n**Q: Last week I fixed all the `404` errors that Webmaster Tools reported, but\nthey're still listed in my account. Does this mean I didn't fix them correctly? How long will it\ntake for them to disappear?** \n\nA: Take a look at the 'Detected' column on the Crawl errors page---this is the most recent date on\nwhich we detected each error. If the date(s) in that column are from before the time you fixed the\nerrors, that means we haven't encountered these errors since that date. If the dates are more\nrecent, it means we're continuing to see these `404` errors when we crawl.\n\n\nAfter implementing a fix, you can check whether our crawler is seeing the new response code by\nusing\n[Fetch as Googlebot](https://www.google.com/support/webmasters/bin/answer.py?answer=158587).\nTest a few URLs and, if they look good, these errors should soon start to disappear from your\nlist of Crawl errors.\n\n\n**Q: Can I use Google's URL removal tool to make `404` errors disappear from my\naccount faster?**\n\n\nA: No; the URL removal tool removes URLs from Google's search results, not from your Webmaster\nTools account. It's designed for urgent removal requests only, and using it isn't necessary when a\nURL already returns a `404`, as such a URL will drop out of our search results\nnaturally over time. See the bottom half of\n[this blog post](/search/blog/2010/05/url-removal-explained-part-iv-tracking)\nfor more details on what the URL removal tool can and can't do for you.\n\n\nStill want to know more about `404` errors? Check out\n[`404` week](/s/results/search/blog?q=%22404+week%22) from our blog, or drop\nby our\n[Webmaster Help Forum](https://support.google.com/webmasters/community).\n\n\nPosted by\n[Susan Moskwa](/search/blog/authors/susan-moskwa),\nWebmaster Trends Analyst"]]