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. On-Page / Site Optimization
    4. How to do this 301 redirection

    How to do this 301 redirection

    On-Page / Site Optimization
    3 3 111
    • 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.
    • juanmiguelcr
      juanmiguelcr last edited by

      Hi there! I have two domains with the same content. Some guys in this forum posted that It would be convinient to do a 301 redirect from one ".com" domain to ".es" domain (my potential market). I just tried to set it up in the htaccess file but it dind't worked at all.

      Something like:

      redirect 301 http://wwww.domain.com http://www.domain.es

      I just configure in the webmaster tools the domain www.domain.com as preferred domain insted of http://domain.comThe same with the other domain.

      Any help?

      many thanks

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

        Try this

        Options +FollowSymLinks
        RewriteEngine on
        RewriteRule (.*) http://www.newdomain.com/$1 [R=301,L]

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

          Hey Juan,

          On the old domain have this in your .htaccess file

          RewriteEngine On RedirectMatch 301 (.*) http://www.domain.es/$1

          Then you may want a separate HTACCESS rule to forward all traffic without www. to use it

          RewriteCond %{HTTP_HOST} !^www.
          RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]

          I hope that helps, but I have a feeling I may have missed the point of the question. Let me know if I did.

          • Andie
          1 Reply Last reply Reply Quote 1
          • 1 / 1
          • First post
            Last post
          • 301 redirects
            xinar
            xinar
            0
            3
            37

          • 301 Redirect to external site
            RameshNair
            RameshNair
            0
            5
            1.2k

          • 301 Redirect from .html
            SorinaDascalu
            SorinaDascalu
            0
            2
            76

          • Boatload of 301 Redirects Question
            MikeRoberts
            MikeRoberts
            0
            2
            82

          • Redoing a site - 404 redirect or 301 redirect
            danatanseo
            danatanseo
            0
            3
            536

          • 301 redirect link
            AUSOM
            AUSOM
            0
            4
            583

          • How do I do a 301 Redirect in IIS 7 from http://www.freightmonster.com/index.html to http://freightmonster.com/index.html when I don't have a physical page to redirect?
            EricaMcGillivray
            EricaMcGillivray
            0
            4
            1.0k

          • 301 redirect and then keywords in URL
            BobGW
            BobGW
            0
            14
            2.5k

          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