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. 301 redirects

    301 redirects

    Intermediate & Advanced SEO
    5 2 113
    • 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.
    • jwdl
      jwdl last edited by

      Hello,

      I want to ditch about 1000 pages of a 2000+ page site. I believe the 301 redirect thing is the way to go but my expertise is limited. Is there a way to do a blanket redirect ie if a user or search engine looks for a page thats not there it all gets redirected to the index page or do I have to do each one manually?

      Thanks

      Ian

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

        this depends how your site is set up ... for example if you are redirecting a directory (eg .com/blog/) to your root thats easy enough to do - but if they are specific files that don't have within say the root or a folder you are not redirecting in it's entirety it would be manual work I am afraid. - see below

        The other option is to drop to 404 page if you are just removing the content and not redirecting to relevant content ... admitting a page is missing and hasn't been replaced is sometimes the best way to show you are working on your site and consolidating info to be valuable to users. Also you can use your 404 page to have a big of fun and explain to users why something has gone missing or changed - or even just have a search box there.

        _RewriteEngine on
        RewriteBase /
        RewriteRule ^old_dir/(.*) http://www.example.com/new_dir/ [R=301,L]_
        
        jwdl 1 Reply Last reply Reply Quote 0
        • jwdl
          jwdl @SEOAndy last edited by

          Hello Andy,

          Thanks for that.

          I have most of it in a directory so just so I know I've got it right... in the htaccess file I put a line:

          RewriteEngine on RewriteBase / RewriteRule ^gallery/(.*) http://www.example.com/ [R=301,L]

          Where /gallery is the directory to be moved, will send everything from the directory (including stuff in subdirectories) to the index page? I do have a corresponding new gallery but the file names are different.

          Cheers

          SEOAndy 1 Reply Last reply Reply Quote 0
          • SEOAndy
            SEOAndy @jwdl last edited by

            you can point example.com to any directory you wish...

            and they should be on seperate lines, not sure why moz changes that

            RewriteEngine on RewriteBase /

            RewriteRule ^gallery/(.*) http://www.example.com/ [R=301,L]

            jwdl 1 Reply Last reply Reply Quote 1
            • jwdl
              jwdl @SEOAndy last edited by

              ok thanks

              1 Reply Last reply Reply Quote 0
              • 1 / 1
              • First post
                Last post
              • 301 redirects
                ThomasHarvey
                ThomasHarvey
                0
                6
                203

              • 301 Redirects... Redirect all content at once or in increments?
                Koki.Mourao
                Koki.Mourao
                0
                6
                175

              • If you do 302 redirect then change to 301 redirect do you lose all link juice?
                EricaMcGillivray
                EricaMcGillivray
                0
                3
                792

              • 301 Redirection
                PremioOscar
                PremioOscar
                0
                9
                138

              • .htaccess 301 Redirect Help! Specific Redirects and Blanket Rule
                LynnPatchett
                LynnPatchett
                0
                3
                3.1k

              • 301 Redirect To Another 301 Redirect
                cbielich
                cbielich
                0
                5
                247

              • 301 redirect subdomain to path and 301 for popular pages
                Mike.Goracke
                Mike.Goracke
                0
                2
                187

              • 301 redirects.
                Matt-Williamson
                Matt-Williamson
                0
                5
                270

              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