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
-
Page rank and menus
Hi, My client has a large website and has a navigation with main categories. However, they also have a hamburger type navigation in the top right. If you click it it opens to a massive menu with every category and page visible. Do you know if having a navigation like this bleeds page rank? So if all deep pages are visible from the hamburger navigation this means that page rank is not being conserved to the main categories. If you click a main category in the main navigation (not the hamburger) you can see the sub pages. I think this is the right structure but the client has installed this huge menu to make it easier for people to see what there is. From a technical SEO is this not bad?
Intermediate & Advanced SEO | | AL123al0 -
One Page Design / Single Product Page
I have been working in a project. Create a framework for multi pages that I have So here is the case
Intermediate & Advanced SEO | | Roman-Delcarmen
Most of them are single page product / one page design wich means that I dont have many pages to optimize. All this sites/ pages follow the rules of a landing page optimization because my main goals is convert as many users as I can. At this point I need to optimize the SEO, the basic stuff such as header, descriptions, tittles ect. But most of my traffic is generated by affiliates, which is good beacuse I dont have to worrie to generate traffic but if the affiliate network banned my product, then I lose all my traffic. Put all my eggs in the same basket is not a good idea. Im not an seo guru so that is the reason Im asking whic strategies and tactics can give me results. All kind of ideas are welcome1 -
AMP pages for a responsive Ecommerce website?
Howdy guys, I'm wondering if AMP is worthwhile intergrating into a responsive e-commerce site? I'm under the impression that the benefits of AMP would be focused around speed, however it may come at the cost of conversion rate if it was to be delivered for product pages, etc. I'm presuming that even if AMP was on every page across a responsive ecommerce site, Google would only display AMP pages in the carousel for news articles, such as on the integrated blog? Any advice would be awesome! Thanks guys 🙂
Intermediate & Advanced SEO | | JAR8970 -
Google indexing only 1 page out of 2 similar pages made for different cities
We have created two category pages, in which we are showing products which could be delivered in separate cities. Both pages are related to cake delivery in that city. But out of these two category pages only 1 got indexed in google and other has not. Its been around 1 month but still only Bangalore category page got indexed. We have submitted sitemap and google is not giving any crawl error. We have also submitted for indexing from "Fetch as google" option in webmasters. www.winni.in/c/4/cakes (Indexed - Bangalore page - http://www.winni.in/sitemap/sitemap_blr_cakes.xml) 2. http://www.winni.in/hyderabad/cakes/c/4 (Not indexed - Hyderabad page - http://www.winni.in/sitemap/sitemap_hyd_cakes.xml) I tried searching for "hyderabad site:www.winni.in" in google but there also http://www.winni.in/hyderabad/cakes/c/4 this link is not coming, instead of this only www.winni.in/c/4/cakes is coming. Can anyone please let me know what could be the possible issue with this?
Intermediate & Advanced SEO | | abhihan0 -
Does it make sense to create new pages with friendlier URLs then redirect old pages to new?
Hi Moz! My client has messy URLs. does it make sense to write new clean URLs, then 301 redirect all old URLs to the new ones? Thanks for reading!
Intermediate & Advanced SEO | | DA20130 -
Should I merge these pages
I have this business and am not sure if I should have a separate page for all of the different roofing subservices or if i should put them all on one page. Even though they are separate, but related services, I feel they could end up competing against one another If I merge them I will also have more related and keyword rich content on one page that I could focus my efforts on.
Intermediate & Advanced SEO | | Atomicx0 -
Why is my XML sitemap ranking on the first page of google for 100s of key words versus the actual relevant page?
I still need this question answerd and I know it's something I must have changed. But google is ranking my sitemap for 100s of key terms versus the actual page. It's great to be on the first page but not my site map...... Geeeez.....
Intermediate & Advanced SEO | | ursalesguru0 -
Should I index tag pages?
Should I exclude the tag pages? Or should I go ahead and keep them indexed? Is there a general opinion on this topic?
Intermediate & Advanced SEO | | NikkiGaul0