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. Technical SEO Issues
    4. 301 Redirect for 3 Domains into 1 New Domain

    301 Redirect for 3 Domains into 1 New Domain

    Technical SEO Issues
    3 3 517
    • 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.
    • cmaseattle
      cmaseattle last edited by

      So I wanted a quick sanity check on the htaccess syntax for migrating 3 domains into 1 new domain.  For example, we're migrating 3 sites abc.com, def.com and ghi.com, all into 1 new site on ghi.com.

      Here's the htaccess we're placing on the root of ghi.com:

      _redirect 301 http://www.abc.com/wines.html http://www.ghi.com/wines redirect 301 http://www.def.com/trade.html http://www.ghi.com/trade
      redirect 301 http://www.ghi.com/winery-tours.html http://www.ghi.com/visit/taste_

      On the DNS side of things, we're parking abc.com and def.com on the ghi.com server.

      I'm not seeing examples of htaccess files for this scenario, and none that use any domain info on the "from" side of the redirect 301 syntax.  Any suggestions before we pull the trigger?

      Thanks!

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

        Please try this

        I assume every old site has 3 different .htaccess files

        Put Following codes in .htaccess of http://www.abc.com

        Options -Indexes RewriteEngine onOptions +FollowSymLinks RewriteRule ^_/wines.html _ _ http://www.ghi.com/wines_[L,R=301]

        Put Following codes in .htaccess of http://www.def.com

        Options -Indexes RewriteEngine onOptions +FollowSymLinks
        RewriteRule ^__/trade.html_ __http://www.ghi.com/trade_ [L,R=301]

        Put Following codes in .htaccess of http://www.ghi.com Options -Indexes RewriteEngine on__Options +FollowSymLinks RewriteRule ^_/winery-tours.html _ _http://www.ghi.com/visit/taste _ [L,R=301]

        It should work. Clear browser history & check.

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

          If I understand your question, you cannot redirect abc.com URLs from an htaccess file on ghi.com. That directive has to be placed on abc.com's htaccess file.

          So the abc.com htaccess would show the specific redirects to ghi, ie:

          redirect 301 /wines.html http://www.ghi.com/wines

          def.com would also have an htaccess with redirects for each landing page:

          redirect 301 /trade.html http://www.ghi.com/trade

          ghi.com would not need any redirects since thats the site you want people to land on.

          Unless you want all urls on abc.com to simply redirect to the root www.ghi.com, you have to write a redirect for every page you want to redirect (or use advanced code to rewrite every landing page to the new domain).

          1 Reply Last reply Reply Quote 0
          • 1 / 1
          • First post
            Last post
          • Redirect multiple domains to 1 domain or not?
            Njnbiure45r4
            Njnbiure45r4
            0
            6
            377

          • 301 Domain Redirect And Old Domain to a New one including pages
            brooksmanley
            brooksmanley
            0
            2
            62

          • How to redirect old domain to new domain.
            OlegKorneitchouk
            OlegKorneitchouk
            0
            4
            82

          • 301 redirect of one site version to new domain
            Andropenis_Australia
            Andropenis_Australia
            0
            3
            387

          • 301 from old domain to new domain
            Jinx14678
            Jinx14678
            0
            3
            503

          • 301 Redirect Domain or 301 Redirect Domain + Interior Pages
            Room214
            Room214
            0
            7
            1.1k

          • Any way around buying hosting for an old domain to 301 redirect to a new domain?
            MarkFasel51
            MarkFasel51
            0
            17
            1.7k

          • 301 Redirect from sub domain to new domain
            Thos003
            Thos003
            0
            3
            1.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