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
-
Wordpress Tags error in MOZ
Hi, We are getting an enormous amount of missing meta description only on our tag archives. When we post we fill in a description and are using the Yoast plugin ( getting green lights). Now we are finding that we're missing descriptions in tags archives. What is the best thing to do? We're finding that the tags are creating a separate url for each tag that has missing description even though the post has a full description. 1. To block spiders from crawling tags? 2. To stop using tags? 3. What do you suggest? Thank you
Intermediate & Advanced SEO | | WalterHalicki0 -
How does this company rank this page?
If you Google the keyword "used iPhone 5," the URL ranking #1 in the SERP is the following: http://buy.gazelle.com/buy-used-iphone-5/ This page has zero content on it and a button on it that takes you to a category page with the iPhone 5 pre selected. My question is **how does this page outrank the sites products pages? **I ran a backlink analysis and don't see any links pointing to that URL. Also, **how does this site deal with its duplicate content issues? **If you look at the following URLs, you'll see a bunch of duplicate content in the "Key Features" section below the fold. http://buy.gazelle.com/buy/used/iphone-5-16gb-at-t http://buy.gazelle.com/buy/used/iphone-5-16gb-sprint If you think about it, this site will have different product pages for each variations of cellphone carrier and cellphone storage capacity. So for an iPhone 5, they will have 15 pages! Any insight into this would be much appreciated!
Intermediate & Advanced SEO | | Cody_West0 -
E-commerce System without error page
I´d love to know your thoughts about this particular issue: Vtex is top3 e-commerce system in brazil. ( issue is huge) the system do not use 4XX responde codes If there is a error page, they just redirect it to a search page with 200 code. in Google index we can find a lot of "empty" pages ( indexed error pagess) We can´t use noindex for them Example:
Intermediate & Advanced SEO | | SeoMartin1
http://www.taniabulhoes.com.br/this-is-a-test
OR
http://www.taniabulhoes.com.br/thisisatest Any suggestions?0 -
Big discrepancies between pages in Google's index and pages in sitemap
Hi, I'm noticing a huge difference in the number of pages in Googles index (using 'site:' search) versus the number of pages indexed by Google in Webmaster tools. (ie 20,600 in 'site:' search vs 5,100 submitted via the dynamic sitemap.) Anyone know possible causes for this and how i can fix? It's an ecommerce site but i can't see any issues with duplicate content - they employ a very good canonical tag strategy. Could it be that Google has decided to ignore the canonical tag? Any help appreciated, Karen
Intermediate & Advanced SEO | | Digirank0 -
Will pages irrelevant to a site's core content dilute SEO value of core pages?
We have a website with around 40 product pages. We also have around 300 pages with individual ingredients used for the products and on top of that we have some 400 pages of individual retailers which stock the products. Ingredient pages have same basic short info about the ingredients and the retail pages just have the retailer name, adress and content details. Question is, should I add noindex to all the ingredient and or retailer pages so that the focus is entirely on the product pages? Thanks for you help!
Intermediate & Advanced SEO | | ArchMedia0 -
How to have pages re-indexed
Hi, my hosting company has blocked one my web site seeing it has performance problem. Result of that, it is now reactivated but my pages had to be reindexed. I have added my web site to Google Webmaster tool and I have submitted my site map. After few days it is saying: 103 number of URLs provided 39 URLs indexed I know Google doesn't promesse to index every page but do you know any way to increase my chance to get all my pages indexed? By the way, that site include pages and post (blog). Thanks for your help ! Nancy
Intermediate & Advanced SEO | | EnigmaSolution0 -
How do I fix the error duplicate page content and duplicate page title?
On my site www.millsheating.co.uk I have the error message as per the question title. The conflict is coming from these two pages which are effectively the same page: www.millsheating.co.uk www.millsheating.co.uk/index I have added a htaccess file to the root folder as I thought (hoped) it would fix the problem but I doesn't appear to have done so. this is the content of the htaccess file: Options +FollowSymLinks RewriteEngine On RewriteCond %{HTTP_HOST} ^millsheating.co.uk RewriteRule (.*) http://www.millsheating.co.uk/$1 [R=301,L] RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.html\ HTTP/ RewriteRule ^index\.html$ http://www.millsheating.co.uk/ [R=301,L] AddType x-mapp-php5 .php
Intermediate & Advanced SEO | | JasonHegarty0 -
Do in page links pointing to the parent page make the page more relevant for that term?
Here's a technical question. Suppose I have a page relevant to the term "Mobile Phones". I have a piece of text, on that page talking about "mobile phones", and within that text is the term "cell phones". Now if I link the text "cell phones", to the page it is already placed on (ie the parent page) - will the page gain more relevancy for the term "cell phones"?? Thanks
Intermediate & Advanced SEO | | James770