The Moz Q&A Forum

    • Forum
    • Questions
    • My Q&A
    • Users
    • Ask the Community

    Welcome to the Q&A Forum

    Browse the forum for helpful insights and fresh discussions about all things SEO.

    1. SEO and Digital Marketing Q&A Forum
    2. Categories
    3. Intermediate & Advanced SEO
    4. Custom Error and page not found responses

    Custom Error and page not found responses

    Intermediate & Advanced SEO
    7 5 982
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as question
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • dbuckles
      dbuckles last edited by

      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.

      1 Reply Last reply Reply Quote 0
      • smstv
        smstv last edited by

        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

        1 Reply Last reply Reply Quote 0
        • RyanKent
          RyanKent last edited by

          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.

          1 Reply Last reply Reply Quote 2
          • dbuckles
            dbuckles last edited by

            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.

            RyanKent Dr-Pete 2 Replies Last reply Reply Quote 1
            • RyanKent
              RyanKent @dbuckles last edited by

              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.

              1 Reply Last reply Reply Quote 0
              • AlanMosley
                AlanMosley last edited by

                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.

                1 Reply Last reply Reply Quote 0
                • Dr-Pete
                  Dr-Pete @dbuckles last edited by

                  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.

                  1 Reply Last reply Reply Quote 1
                  • 1 / 1
                  • First post
                    Last post
                  • Not found errors (404) due to being hacked
                    julie-getonthemap
                    julie-getonthemap
                    0
                    5
                    2.2k

                  • Pages Returning A 403 Error
                    wesdunn1977
                    wesdunn1977
                    0
                    5
                    376

                  • Is it a problem to use a 301 redirect to a 404 error page, instead of serving directly a 404 page?
                    lcourse
                    lcourse
                    0
                    5
                    2.0k

                  • My home page is not found by the "Grade a Page" tool
                    DavidLee
                    DavidLee
                    0
                    4
                    153

                  • End of March we migrated our site over to HubSpot. We went from page 3 on Google to non existent. Still found on page 2 of Yahoo and Bing. Beyond frustrated...HELP PLEASE "www.vortexpartswashers.com"
                    Jben
                    Jben
                    0
                    4
                    484

                  • Duplicate page content and Duplicate page title errors
                    Cyrus-Shepard
                    Cyrus-Shepard
                    0
                    9
                    834

                  • How do I fix the error duplicate page content and duplicate page title?
                    rtavs
                    rtavs
                    0
                    4
                    467

                  • Generating 404 Errors but the Pages Exist
                    OptimaD
                    OptimaD
                    0
                    15
                    8.1k

                  Get started with Moz Pro!

                  Unlock the power of advanced SEO tools and data-driven insights.

                  Start my free trial
                  Products
                  • Moz Pro
                  • Moz Local
                  • Moz API
                  • Moz Data
                  • STAT
                  • Product Updates
                  Moz Solutions
                  • SMB Solutions
                  • Agency Solutions
                  • Enterprise Solutions
                  • Digital Marketers
                  Free SEO Tools
                  • Domain Authority Checker
                  • Link Explorer
                  • Keyword Explorer
                  • Competitive Research
                  • Brand Authority Checker
                  • Local Citation Checker
                  • MozBar Extension
                  • MozCast
                  Resources
                  • Blog
                  • SEO Learning Center
                  • Help Hub
                  • Beginner's Guide to SEO
                  • How-to Guides
                  • Moz Academy
                  • API Docs
                  About Moz
                  • About
                  • Team
                  • Careers
                  • Contact
                  Why Moz
                  • Case Studies
                  • Testimonials
                  Get Involved
                  • Become an Affiliate
                  • MozCon
                  • Webinars
                  • Practical Marketer Series
                  • MozPod
                  Connect with us

                  Contact the Help team

                  Join our newsletter
                  Moz logo
                  © 2021 - 2026 SEOMoz, Inc., a Ziff Davis company. All rights reserved. Moz is a registered trademark of SEOMoz, Inc.
                  • Accessibility
                  • Terms of Use
                  • Privacy