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. redirect 404 pages to homepage

    redirect 404 pages to homepage

    Intermediate & Advanced SEO
    8 4 8.6k
    • 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.
    • igrizo
      igrizo last edited by

      Hello,

      I'm puting a new website on a existing domain. In order to not loose the links that point to the varios old url I would like to redirect them to homepage.

      The old website was a mess as there was no seo and the pages didn't target any keywords. Thats why I would like to redirect all links to home.

      What do you think is the best way to do this ?

      I tried  to ad this in the .htaccess but it's not working;

      ErrorDocument 404 /index.php

      Con you tell me how it exacly look?

      Now the hole file is like this:

      @package        Joomla

      @copyright    Copyright (C) 2005 - 2012 Open Source Matters. All rights reserved.

      @license        GNU General Public License version 2 or later; see LICENSE.txt

      READ THIS COMPLETELY IF YOU CHOOSE TO USE THIS FILE!

      The line just below this section: 'Options +FollowSymLinks' may cause problems

      with some server configurations.  It is required for use of mod_rewrite, but may already

      be set by your server administrator in a way that dissallows changing it in

      your .htaccess file.  If using it causes your server to error out, comment it out (add # to

      beginning of line), reload your site in your browser and test your sef url's.  If they work,

      it has been set by your server administrator and you do not need it set here.

      Can be commented out if causes errors, see notes above.

      Options +FollowSymLinks

      Mod_rewrite in use.

      RewriteEngine On

      Begin - Rewrite rules to block out some common exploits.

      If you experience problems on your site block out the operations listed below

      This attempts to block the most common type of exploit attempts to Joomla!

      Block out any script trying to base64_encode data within the URL.

      RewriteCond %{QUERY_STRING} base64_encode[^(]([^)]) [OR]

      Block out any script that includes a

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

        Hi Igrizio,

        I'm not entirely sure but could it be that you're redirecting to //index.php instead of /index.php?

        You can use this website to see the the statuscode and any redirect locations of a website.

        Best of luck,

        Sven Witteveen
        Expand Online

        igrizo 1 Reply Last reply Reply Quote 1
        • igrizo
          igrizo @DeptAgency last edited by

          Thanks for advise but the home url is:

          mydomain.com/index.php

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

            I would spread the redirects around as much as possible. If you can give link juice to not only your homepage but all pages your page rank and thus Google search rank will increase once the 301 redirects are indexed by Google. I agree strongly with what Sven Witteveen has said below and would be very inclined to agree with him.

            I hope I was of some help to you.

            Sincerely,

            Thomas von Zickell

            Blueprint Marketing

            1 Reply Last reply Reply Quote 0
            • BlueprintMarketing
              BlueprintMarketing @igrizo last edited by

              I think I have information that may help you Our little more I have comprised a hope will help you.

              this tool will help you quite a bit in the described situation

              http://www.htaccessredirect.net/

              http://www.seomoz.org/blog/how-to-fix-crawl-errors-in-google-webmaster-tools

              http://www.tamingthebeast.net/articles3/spiders-301-redirect.htm

              404 page should include a link back to the home page or site map of your website so users can quickly get back to what they were searching for. A search box, if you have a site search, is also a good idea to add to a 404 page. Other then that, keep the page minimal, remove distractions and get the user off the 404 error page as quickly as they got on.

              Keep in mind most users may not be so savvy when it comes to Internet jargon so simple explanations in English are key! Although, keeping it minimalist does not have to mean "boring". The steps to make a custom 404 page are simple and this site can explain in detail how to create one depending on your server.

              301 Redirects

              If you have old pages on your website that you want to remove or rename, use a 301 redirect to preserve search engine rankings and pass on backlinks and/or page rank. You can even redirect whole websites into new ones. It is easy to do and is very search engine friendly.

              The term "301" stands for "moved permanently". It is created by using a .htaccess file. Follow this guide to learn how to implement many different types of 301 redirects. When pages are deleted instead of redirected with a 301, they turn into 404s (Not Found Pages).

              I want to give credit where credit's due this information directly above was referenced from this website http://www.internetmarketingninjas.com/301.html

              sincerely,

              Thomas von Zickell

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

                Ok, what Thomas is saying I will consider for some special pages but how do I technically do  implement the redirects to home in .htaccess

                ErrorDocument 404 /index.php is not working for now!

                Is it correct?

                RewriteEngine : RewriteEngine On

                Do I have to ad something else to .htaccess ?

                BlueprintMarketing 1 Reply Last reply Reply Quote 0
                • BlueprintMarketing
                  BlueprintMarketing @igrizo last edited by

                  You should have RewriteEngine : RewriteEngine On and you should be able to access the .htaccess

                  have you tried using any of the tools in the URLs below

                  http://www.htaccessredirect.net/

                  &

                  This site talks about best practices of implementation you really just need to upload it to the FTP once you've made the changes using the tool in the URL above

                  http://www.ksl-consulting.co.uk/301-redirect-examples.html

                  Let me know if I can be of more help.

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

                    I'm very confused about where the 404 fits in - are these dead pages? To re-capture the link-juice, you'll need to 301-redirect (which it seems like you're also putting into play). In some cases, if the pages are gone or never existed, just let them be gone. If you take every single URL everyone could ever visit to the home-page, you may generate so many 301s that Google starts to get suspicious. We've seen some issues with this lately. In many cases, it's also just not a good user experience.

                    1 Reply Last reply Reply Quote 1
                    • 1 / 1
                    • First post
                      Last post
                    • Would You Redirect a Page if the Parent Page was Redirected?
                      Nozzle
                      Nozzle
                      0
                      4
                      92

                    • Redirecting homepage to internal page (2nd Tier page)
                      vtmoz
                      vtmoz
                      0
                      4
                      271

                    • Client would like to 301 redirect the homepage to a category page
                      accpar
                      accpar
                      0
                      7
                      165

                    • 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

                    • An affiliate website uses datafeeds and around 65.000 products are deleted in the new feeds. What are the best practises to do with the product pages? 404 ALL pages, 301 Redirect to the upper catagory?
                      Everett
                      Everett
                      0
                      5
                      135

                    • Any downsides of (permanent)redirecting 404 pages to more generic pages(category page)
                      MatthewBarby
                      MatthewBarby
                      0
                      2
                      133

                    • How to get around Google Removal tool not removing redirected and 404 pages? Or if you don't know the anchor text?
                      TheSEODR
                      TheSEODR
                      0
                      4
                      387

                    • 404 Redirecting to the home page
                      triveraseo
                      triveraseo
                      0
                      3
                      823

                    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