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. How to redirect whole site to home page without breaking wordpress

    How to redirect whole site to home page without breaking wordpress

    Intermediate & Advanced SEO
    6 3 518
    • 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.
    • RaceMedia
      RaceMedia last edited by

      Hi all

      I had a phpprobid site which was heavily indexed but got hacked.

      I have deleted the old site and installed wordpress and a holding page.

      I can't work out how to 301 redirect all the old indexed pages to the home page without the existing wordpress redirect.

      Anyone care to help?

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

        The new Wordpress installation will take all the homepage juice so you don't need to direct home to home.

        For all the rest, do you have an old sitemap or directory?  You could easily direct old pages to the same relevant new pages or even back to homepage if you need.  If you just want the new site.com to take all site.com's old juice - that will happen as Google indexes the new Wordpress.

        After that it's simple enough - just Redirect 301 /old-directory/ http://www.site.com in an htaccess file.

        Am I missing something in the question?

        RaceMedia 1 Reply Last reply Reply Quote 0
        • RaceMedia
          RaceMedia @MattAntonino last edited by

          yeh - they weren't in directories - they were top level - so the old urls are like

          xxxx.com/wanted_ads.php

          xxxx.com/featured,option,auctions_show/

          There's over 1000 of them so I was hoping to do a mod rewrite that would 301 them all to the home page without breaking the wordpress rewrite rules.

          MoosaHemani 1 Reply Last reply Reply Quote 0
          • MoosaHemani
            MoosaHemani @RaceMedia last edited by

            If there URLs are not available then they must be giving the status of 404 all you have to do is to add a command in the .htaccess that any page that as a status of 404 will redirect to home page so that way all the pages that are no more available will automatically take the user to the home page.

            Hope this helps!

            1 Reply Last reply Reply Quote 1
            • RaceMedia
              RaceMedia last edited by

              Thanks Moosa

              I hadn't considered that way of handling the issue.

              SEO-wise is that a good tactic or is it best just to salvage something from the train wreck?

              MattAntonino 1 Reply Last reply Reply Quote 0
              • MattAntonino
                MattAntonino @RaceMedia last edited by

                Actually, before you redirect ALL errors to the homepage, please do some reading on that tactic:

                http://www.rimmkaufman.com/blog/seo-and-404-pages/01022013/

                http://support.google.com/webmasters/bin/answer.py?hl=en&answer=93641

                http://support.google.com/webmasters/bin/answer.py?hl=en&answer=2409439

                http://googlewebmastercentral.blogspot.com.au/2011/05/do-404s-hurt-my-site.html

                And in this: http://static.googleusercontent.com/external_content/untrusted_dlcp/www.google.com/en//webmasters/docs/search-engine-optimization-starter-guide.pdf

                Google specifically says (page 13)

                Avoid not having a 404 page at all.

                Finally:

                http://support.google.com/webmasters/bin/answer.py?hl=en&answer=83105

                Use a 301 Redirect to permanently redirect all pages on your old site to your new site. This tells search engines and users that your site has permanently moved. We recommend that you move and redirect a section or directory first, and then test to make sure that your redirects are working correctly before moving all your content.

                Don't do a single redirect directing all traffic from your old site to your new home page. This will avoid 404 errors, but it's not a good user experience. It's more work, but a page-to-page redirect will help preserve your site's ranking in Google while providing a consistent and transparent experience for your users. If there won't be a 1:1 match between pages on your old site and your new site (recommended), try to make sure that every page on your old site is at least redirected to a new page with similar content.

                Google does not recommend this tactic and says "Avoid."  That's enough for me.  I don't know how to help you with the Mod Rewrite but I wouldn't 301 your 404. 😉

                1 Reply Last reply Reply Quote 2
                • 1 / 1
                • First post
                  Last post
                • 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.
                  DonnaDuncan
                  DonnaDuncan
                  0
                  3
                  81

                • Redirecting an Entire Site to a Page on Another Site?
                  photoseo1
                  photoseo1
                  0
                  3
                  50

                • New Site (redesign) Launched Without 301 Redirects to New Pages - Too Late to Add Redirects?
                  BeanstalkIM
                  BeanstalkIM
                  0
                  8
                  732

                • 3 Wordpress sites 1 Tumblr site coming under 1domain(4subdomains) WPMU: Proper Redirect?
                  vmialik
                  vmialik
                  0
                  5
                  131

                • Redirecting Pages from site A to site B
                  gazzerman1
                  gazzerman1
                  0
                  6
                  100

                • Urgent Site Migration Help: 301 redirect from legacy to new if legacy pages are NOT indexed but have links and domain/page authority of 50+?
                  JDMcNamara
                  JDMcNamara
                  0
                  7
                  450

                • How do you transition a keyword rank from a home page to a sub-page on the site?
                  JustinTaylor88
                  JustinTaylor88
                  0
                  4
                  518

                • 1 of the sites i work on keeps having its home page "de-indexed" by google every few months, I then apply for a review and they put it back up. But i have no idea why this keeps happening and its only the home page
                  RyanKent
                  RyanKent
                  0
                  7
                  606

                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