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. Redirecting a domain

    Redirecting a domain

    Technical SEO Issues
    10 6 1.1k
    • 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.
    • Marvo
      Marvo last edited by

      I was setting up a new campaign and received the following error from Roger Robot.

      "We have detected that the domain www.sitename.com and the domain sitename.com both respond to web requests and do not redirect. Having two "twin" domains that both resolve forces them to battle for SERP positions, making your SEO efforts less effective. We suggest redirecting one, then entering the other here."

      I know about redirecting a PAGE using 301 Redirects and how to specify the www. canonical in Google webmaster tools, but is there a "DOMAIN" redirect that I'm missing.

      What would you suggest doing given the error message above.

      Thanks,

      Bill

      Sqnch.jpg

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

        Hi Bill.

        Your issue is a common one and yes, there is a solution.

        First step is to determine which version of a URL you wish to represent your site, with or without the www. For purposes of this discussion I'll assume you wish to keep the www prefix. In that case, you need to set up a redirect to send all non-www traffic to it's www equivalent.

        If you have cPanel access to your web server, you should find a Redirect tool there. Otherwise, you need to modify your htaccess file. If that less sentence is not something you are familiar with, then contact your web host and let them know your wishes. They can easily set this up for you.

        For a demo of how it works, type in "google.com" in your web browser. Notice how the address is always changed to http://www.google.com/. That action is because of a properly configured redirect.

        Marvo 1 Reply Last reply Reply Quote 0
        • kchandler
          kchandler last edited by

          What type of hosting/server do you have linux based or microsoft?

          Marvo 1 Reply Last reply Reply Quote 0
          • Marvo
            Marvo @kchandler last edited by

            not sure... this site belongs to a friend.  Can I tell from just looking at the html or do I need to access the server/host?

            kchandler Highland Marvo 3 Replies Last reply Reply Quote 0
            • kchandler
              kchandler @Marvo last edited by

              You would probably need more information than just looking at the client side. The only way that could work out is if the file extensions were .aspx or .php or something like that.

              Essentially what i was getting to, is you would set the redirect differently depending on what type of hosting you are using. If it was microsoft base you would set it in IIS, while if it was linux based you would added it to your root .htacess file.

              Hope that helped!

              1 Reply Last reply Reply Quote 1
              • Highland
                Highland @Marvo last edited by

                If you're using Firefox, go get the Domain Details addon

                https://addons.mozilla.org/en-us/firefox/addon/domain-details/

                Then go surf to your site and it should tell you (based on the headers) what kind of server you're running (for instance, seomoz is running Apache 2.2.14)

                The most common solution is using htaccess, which can determine at the server level which version to show and 301 all traffic there. Not all web servers support this, though (which is why Kyle asked the question). IIS7+ can support it, as can the most popular open source ones (nginx, lighthttpd, Apache).

                Here's an article on how it works

                http://www.seomoz.org/blog/rewriterule-split-personality-explained

                1 Reply Last reply Reply Quote 0
                • Marvo
                  Marvo @RyanKent last edited by

                  I'm getting access to the FTP and Host Server.

                  If they have a cPanel I'll look for that.  May need your help later, once I know more what I'm dealing with.

                  Thanks so far

                  1 Reply Last reply Reply Quote 0
                  • Marvo
                    Marvo @Marvo last edited by

                    Thanks for the info.

                    I'll dig in and see what I can find.

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

                      I looked at the server headers for the URL mentioned in the screenshot, and the site is running IIS6. I don't have the instructions for doing the domain redirect for that handy, and it's been ages since I've done it, but at least now we know we can't just say use .htaccess. 🙂

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

                        I thought it would be super cool if someone would post the exact syntax to use in .htaccess to make this happen.  For all the hordes of info out there on redirects and htaccess, it's amazingly hard to find the code for this one.  Here is what worked for me:

                        <code>RewriteCond %{HTTP_HOST} ^example\.com$ [NC]
                        RewriteRule ^(.*)$ http://www.example.com/$1 [R=301,L]</code>
                        
                        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

                        • Old Redirected Domain is replacing my current domain on SERPs
                          JoaoCJ
                          JoaoCJ
                          0
                          9
                          74

                        • I've consolidated other domains to a single one with 301 redirects, yet the new domain authority in MOZ is much less that the redirected ones. Is that right?
                          MashBonigala
                          MashBonigala
                          2
                          3
                          232

                        • 301 Redirect for 3 Domains into 1 New Domain
                          JaredMumford
                          JaredMumford
                          0
                          3
                          517

                        • To 301 redirect or not to 301 redirect? duplicate content problem www.domain.com and www.domain.com/en/
                          Chris-CA
                          Chris-CA
                          0
                          5
                          456

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

                        • 301 Redirect from sub domain to new domain
                          Thos003
                          Thos003
                          0
                          3
                          1.1k

                        • Redirecting root domains to sub domains
                          Yozzer
                          Yozzer
                          0
                          4
                          804

                        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