Custom Error and page not found responses
-
When there is a 500 Internal Server Error, is it better to return an HTTP 500 response and custom error page from the requested URL, or is it better to return a 302 redirect? The redirect would send the browser to the custom error page, which would return the HTTP 500 result.
We tell Google not to index or follow our error pages, so if Google sees an error at a URL, we don't necessarily want Google to think that the URL should be ignored. That's why the alternative would be to redirect to a custom error page with it's own URL.
Similarly, what's the best approach if the response is a 404? Return HTTP 404 and custom 404 page from the requested URL, or redirect?
Thanks.
-
Just to add to Ryan's comments - if you had massive 500 issues, then you might theoretically argue that 301'ing would keep Google from crawling so many errors. At best, though, it's a band-aid, and maybe even a poor-fitting one. The better question is - why are those 500s occurring. Ultimately, they should be fixed, not patched.
Usually, Google isn't going to penalize a one-time 500 error or a short-term server problem. The only time I could see 301'ing is if you knew you had a major problem and couldn't fix it for a few days. The 301 (or possibly 302, in this case) could buffer you from crawl problems while you made the fixes. Obviously, that wouldn't be an ideal situation.
-
I have often though about this but have never really come to a answer.
If you 301 or 302 a page to a 404 error page and then return a 404, what are you telling the search engine. are you telling them that the erorr page does not exist, not the origianl page.I have always done just that, it was only recently that when wondering why goolge has not dropped pages from the index, that I had a good think about it. If you dont do anythiong and use the default ugly error page, it give a 404, rather than a 302 then a 404.
is this what gogole was talking about when they came up with soft 404 errors in WMT?
I did set up a test where i did both in 2 sites but i did not follow up on the test. -
The header response code chosen is important. I cannot think of any reason why you would choose to provide a 500 response code other then when your server naturally offers that response.
A 301 code should only be returned if you actually 301 the URL to the proper target. This code sends a message to search engines saying "hey, update the URL in your index to this new URL".
A 404 code should be returned if the content is no longer offered on your site and will not be offered. Actually, a 410 response "Gone" means the content is permanently gone and wont return. This tells search engines they should definitively remove the link. A 404 code tells search engines the content is not presently available. It may be a temporary issue which can later be resolved. When a search engine repeatedly finds a 404 error, they will then take action and remove the link.
-
Thanks for the replies.
I'm not sure I stated my question clearly. What I was wondering, was whether it is better to return status code 500 from the requested url, or status code 301 from the requested url. So in one case, the actual url content would be the error page, and in the other case it would redirect to the error page.
I'm not even sure if there is a difference, but if there is I'd like to learn more.
Thanks.
-
The best approach for a 404 error varies. If you know what the user was looking for and you have that content or similar content available, you should 301 redirect the user to the appropriate page on your site. For example, if you have a page on "Top 10 Christmas Gifts for 2010", if you delete that page you likely should perform a 301 redirect to your "Top 10 Christmas Gifts for 2011" page if it is available.
If you don't have a similar page available on your site, let the URL 404. Ensure your 404 page is helpful. It should have a basic "oh no, we lost your page" message along with your site's normal navigation and a search box. 404 errors are a natural part of the internet. In small numbers they are perfectly fine. Also, ensure your site's links are all valid. You can't control whether an external link leads to a 404 error but none of your internal links should cause a 404 error.
With respect to a 500 error, those are not common (at least compared to 404s). Something on your server is not configured correctly. You should have an error log and investigate the root cause of any 5xx errors. Find the source of the error and take action to fix it.
-
A 404 error means "not found". This is usually the page you get when you make a mistake spelling page name in a site, or if the page is deleted or moved. The problem is that the standard 404 page is ugly and unhelpful.
Many people have figured out that if you use a custom 404 page you can present a much more helpful page to you visitors. Others have taken it a step further and made that custom page a redirect to the home page, so that any links (and PR) pointing to pages that have been deleted (or misspelled) will be passed on to the website.
Hope this helps
Got a burning SEO question?
Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.
Browse Questions
Explore more categories
-
Moz Tools
Chat with the community about the Moz tools.
-
SEO Tactics
Discuss the SEO process with fellow marketers
-
Community
Discuss industry events, jobs, and news!
-
Digital Marketing
Chat about tactics outside of SEO
-
Research & Trends
Dive into research and trends in the search industry.
-
Support
Connect on product support and feature requests.
Related Questions
-
Why Would My Page Have a Higher PA and DA, Links & On-Page Grade & Still Not Rank?
The Search Term is "Alcohol Ink" and our client has a better page authority, domain authority, links to the page, and on-page grade than those in the SERP for spaces 5-10 and we're not even ranked in the top 51+ according to Moz's tracker. The only difference I can see is that our URL doesn't use the exact text like some of the 5-10 do. However, regardless of this, our on-page grade is significantly higher than the rest of them. The one thing I found was that there were two links to the page (that we never asked for) that had a spam score in the low 20's and another in the low 30's. Does anyone have any recommendations on how to maybe get around this? Certainly, a content campaign and linking campaign around this could also help but I'm kind of scratching my head. The client is reputable, with a solid domain age and well recognized in the space so it's not like it's a noob trying to get in out of nowhere.
Intermediate & Advanced SEO | | Omnisye0 -
How long will old pages stay in Google's cache index. We have a new site that is two months old but we are seeing old pages even though we used 301 redirects.
Two months ago we launched a new website (same domain) and implemented 301 re-directs for all of the pages. Two months later we are still seeing old pages in Google's cache index. So how long should I tell the client this should take for them all to be removed in search?
Intermediate & Advanced SEO | | Liamis0 -
Is this page low quality?
Hey everyone, I need some help defining a post whether it is low quality or not. I got a post and it's a roundup post having 5 lists of fonts for free download. I actually linked to the sites from where anyone can download the font. The post is driving 300 visits a day but the bounce rate is too high around 90% and the time spent on the post is about 20 seconds on average (I checked it under GA Behaviour > Site Content > Landing pages). Also, I checked the traffic of those sites which I'm pointing in the roundup post and in their referral traffic my website is contributing. Does this mean that people clicking on the post from SERPs then quickly visiting the site to download the font as there are only 6 fonts featured in the post to download (due to six font they are not spending time)? Should I need to improve it or the page is answering query fast? Any thoughts are welcome.
Intermediate & Advanced SEO | | Bunnypundir0 -
Multiple pages for a Profile
Hi All, We have a Biography website in which we have Celebrity News, Videos, Images etc. We have a main page which shows the biography and sides we show 5 blocks of News, Videos, Images etc and have a More option when clicked the page goes to a page where it shows 100's of news of that celeb or Videos etc This is the main page : sitename.com/celebrityname news: sitename.com/celebrityname/news Videos: sitename.com/celebrityname/videos Images: sitename.com/celebrityname/Images Now these 3 pages have no content in them and when we scan via SEMRUSH it shows as "with duplicate title tags". We have 20K such bio's so 20K * 3 such pages is 60K duplicate title tags How can we deal with such pages? Any help please. Thanks
Intermediate & Advanced SEO | | leengsro870 -
Google is indexing wrong page for search terms not on that page
I’m having a problem … the wrong page is indexing with Google, for search phrases “not on that page”. Explained … On a website I developed, I have four products. For example sake, we’ll say these four products are: Sneakers (search phrase: sneakers) Boots (search phrase: boots) Sandals (search phrase: sandals) High heels (search phrase: high heels) Error: What is going “wrong” is … When the search phrase “high heels” is indexed by Google, my “Sneakers” page is being indexed instead (and ranking very well, like #2). The page that SHOULD be indexing, is the “High heels” page (not the sneakers page – this is the wrong search phrase, and it’s not even on that product page – not in URL, not in H1 tags, not in title, not in page text – nowhere, except for in the top navigation link). Clue #1 … this same error is ALSO happening for my other search phrases, in exactly the same manner. i.e. … the search phrase “sandals” is ALSO resulting in my “Sneakers” page being indexed, by Google. Clue #2 … this error is NOT happening with Bing (the proper pages are correctly indexing with the proper search phrases, in Bing). Note 1: MOZ has given all my product pages an “A” ranking, for optimization. Note 2: This is a WordPress website. Note 3: I had recently migrated (3 months ago) most of this new website’s page content (but not the “Sneakers” page – this page is new) from an old, existing website (not mine), which had been indexing OK for these search phrases. Note 4: 301 redirects were used, for all of the OLD website pages, to the new website. I have tried everything I can think of to fix this, over a period of more than 30 days. Nothing has worked. I think the “clues” (it indexes properly in Bing) are useful, but I need help. Thoughts?
Intermediate & Advanced SEO | | MG_Lomb_SEO0 -
Sitemap error
Hey Guys Everytime I run the tester through google webmaster tools - I keep getting an error that tells me "Your Sitemap appears to be an HTML page. Please use a supported sitemap format instead." An idea how to go about fixing this without changing the site around? https://www.zenory.co.nz/sitemap I have seen competitors sitemaps look similar to mine. Cheers
Intermediate & Advanced SEO | | edward-may0 -
Page Count in Webmaster Tools Index Status Versus Page Count in Webmaster Tools Sitemap
Greeting MOZ Community: I run www.nyc-officespace-leader.com, a real estate website in New York City. The page count in Google Webmaster Tools Index status for our site is 850. The page count in our Webmaster Tools Sitemap is 637. Why is there a discrepancy between the two? What does the Google Webmaster Tools Index represent? If we filed a removal request for pages we did not want indexed, will these pages still show in the Google Webmaster Tools page count despite the fact that they no longer display in search results? The number of pages displayed in our Google Webmaster Tools Index remains at about 850 despite the removal request. Before a site upgrade in June the number of URLs in the Google Webmaster Tools Index and Google Webmaster Site Map were almost the same. I am concerned that page bloat has something to do with a recent drop in ranking. Thanks everyone!! Alan
Intermediate & Advanced SEO | | Kingalan10 -
PDF or HTML Page?
One of our sales team members has created a 25 page word document as a topical page. The plan was to make this into an html page with a table of contents. My thoughts were why not make it a pdf? Is there any con to using a PDF vs an html page? If the PDF was properly optimized would it perform just as well? The goal is to have folks click back to our products and hopefully by after reading about how they work.
Intermediate & Advanced SEO | | Sika220