undefined
Skip to content
Moz logo Menu open Menu close
  • Products
    • Moz Pro
    • Moz Pro Home
    • Moz Local
    • Moz Local Home
    • STAT
    • Moz API
    • Moz API Home
    • Compare SEO Products
    • Moz Data
  • Free SEO Tools
    • Domain Analysis
    • Keyword Explorer
    • Link Explorer
    • Competitive Research
    • MozBar
    • More Free SEO Tools
  • Learn SEO
    • Beginner's Guide to SEO
    • SEO Learning Center
    • Moz Academy
    • SEO Q&A
    • Webinars, Whitepapers, & Guides
  • Blog
  • Why Moz
    • Agency Solutions
    • Enterprise Solutions
    • Small Business Solutions
    • Case Studies
    • The Moz Story
    • New Releases
  • Log in
  • Log out
  • Products
    • Moz Pro

      Your all-in-one suite of SEO essentials.

    • Moz Local

      Raise your local SEO visibility with complete local SEO management.

    • STAT

      SERP tracking and analytics for enterprise SEO experts.

    • Moz API

      Power your SEO with our index of over 44 trillion links.

    • Compare SEO Products

      See which Moz SEO solution best meets your business needs.

    • Moz Data

      Power your SEO strategy & AI models with custom data solutions.

    NEW Keyword Suggestions by Topic
    Moz Pro

    NEW Keyword Suggestions by Topic

    Learn more
  • Free SEO Tools
    • Domain Analysis

      Get top competitive SEO metrics like DA, top pages and more.

    • Keyword Explorer

      Find traffic-driving keywords with our 1.25 billion+ keyword index.

    • Link Explorer

      Explore over 40 trillion links for powerful backlink data.

    • Competitive Research

      Uncover valuable insights on your organic search competitors.

    • MozBar

      See top SEO metrics for free as you browse the web.

    • More Free SEO Tools

      Explore all the free SEO tools Moz has to offer.

    NEW Keyword Suggestions by Topic
    Moz Pro

    NEW Keyword Suggestions by Topic

    Learn more
  • Learn SEO
    • Beginner's Guide to SEO

      The #1 most popular introduction to SEO, trusted by millions.

    • SEO Learning Center

      Broaden your knowledge with SEO resources for all skill levels.

    • On-Demand Webinars

      Learn modern SEO best practices from industry experts.

    • How-To Guides

      Step-by-step guides to search success from the authority on SEO.

    • Moz Academy

      Upskill and get certified with on-demand courses & certifications.

    • SEO Q&A

      Insights & discussions from an SEO community of 500,000+.

    Unlock flexible pricing & new endpoints
    Moz API

    Unlock flexible pricing & new endpoints

    Find your plan
  • Blog
  • Why Moz
    • Small Business Solutions

      Uncover insights to make smarter marketing decisions in less time.

    • Agency Solutions

      Earn & keep valuable clients with unparalleled data & insights.

    • Enterprise Solutions

      Gain a competitive edge in the ever-changing world of search.

    • The Moz Story

      Moz was the first & remains the most trusted SEO company.

    • Case Studies

      Explore how Moz drives ROI with a proven track record of success.

    • New Releases

      Get the scoop on the latest and greatest from Moz.

    Surface actionable competitive intel
    New Feature

    Surface actionable competitive intel

    Learn More
  • Log in
    • Moz Pro
    • Moz Local
    • Moz Local Dashboard
    • Moz API
    • Moz API Dashboard
    • Moz Academy
  • Avatar
    • Moz Home
    • Notifications
    • Account & Billing
    • Manage Users
    • Community Profile
    • My Q&A
    • My Videos
    • Log Out

The Moz Q&A Forum

  • Forum
  • Questions
  • Users
  • Ask the Community

Welcome to the Q&A Forum

Browse the forum for helpful insights and fresh discussions about all things SEO.

  1. Home
  2. Community
  3. Industry News
  4. Industry Events
  5. How to redirect www.xxx.com to xxx.com or vice versa

Moz Q&A is closed.

After more than 13 years, and tens of thousands of questions, Moz Q&A closed on 12th December 2024. Whilst we’re not completely removing the content - many posts will still be possible to view - we have locked both new posts and new replies. More details here.

How to redirect www.xxx.com to xxx.com or vice versa

Industry Events
6
11
101.9k
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as question
Log in to reply
This topic has been deleted. Only users with question management privileges can see it.
  • healers
    healers last edited by Jul 5, 2011, 7:32 PM

    Roger has detected a problem:  We have detected that the domain www.xxx.com and the domain xxx.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.

    hi, i tried creating the campaign and this message popped out.. i dono what to do or how to redirect b/w www.xxx.com and xxx.com ( xxx = hidden site) am using godaddy domain and hosting at hostgator.

    thank you.. waiting for ur reply

    1 Reply Last reply Reply Quote 0
    • ZapoTeX
      ZapoTeX last edited by Oct 22, 2011, 7:15 AM Oct 22, 2011, 7:15 AM

      OK - just a REFRESH problem!

      I canceled the campaign creation and started from scratch again. And this time I had no error message.

      Thanks everyone!

      1 Reply Last reply Reply Quote 0
      • ZapoTeX
        ZapoTeX last edited by Oct 22, 2011, 6:22 AM Oct 22, 2011, 6:21 AM

        Hi everyone, I had the same problem and found this wonderful thread! Thanks a lot! Now, if I check the header of http://domain.com with the tool you suggested, I get the correct message:

        HTTP/1.1 301 Moved Permanently Date: Sat, 22 Oct 2011 09:13:19 GMT Server: Apache Location: http://www.domain.com/ Content-Type: text/html; charset=iso-8859-1

        However, when I try to continue with the campaign creation on SEOmoz, I stille get the same message as I did before. Is there a way to fix this? Am I doing something wrong? Here is my .htaccess:

        ptions +FollowSymlinks

        RewriteEngine On

        RewriteBase /

        RewriteRule ^index.html?$ / [NC,R,L]

        rewritecond %{http_host} ^domain.com [nc]

        rewriterule ^(.*)$ http://www.domain.com/$1 [r=301,nc]

        Thanks for your help! I hope you can guide me to sort things out!

        1 Reply Last reply Reply Quote 0
        • topic:timeago_earlier,4 months
        • healers
          healers @KeriMorgret last edited by Jul 6, 2011, 4:22 PM Jul 6, 2011, 4:22 PM

          yes it works.. thanks keri 🙂

          1 Reply Last reply Reply Quote 0
          • KeriMorgret
            KeriMorgret @KeriMorgret last edited by Jul 6, 2011, 1:18 PM Jul 6, 2011, 1:18 PM

            Yes, the 301 response is what you're looking for. Test a couple of your interior pages in addition to just your home page to make sure it works right, then you're good to go!

            1 Reply Last reply Reply Quote 0
            • nux
              nux last edited by Jul 6, 2011, 12:11 PM Jul 6, 2011, 12:11 PM

              Here's how I do it in .htaccess in Linux:

              RewriteEngine on RewriteCond %{HTTP_HOST} !^www\. [NC] RewriteRule .* http://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

              If you already have a RewriteEngine in your .htaccess, you can skip that part.

              What this does is check if the host contains www.  If it doesn't it redirects to www. version.  You can find more info here: http://www.stevefortuna.com/redirect-to-www/

              1 Reply Last reply Reply Quote 1
              • healers
                healers @KeriMorgret last edited by Jul 6, 2011, 8:45 AM Jul 6, 2011, 8:45 AM

                1. Requesting: http://xxx.com

                <dl>

                <dt>server Response:</dt>

                <dd>HTTP/1.1 301 Moved Permanently Date: Wed, 06 Jul 2011 11:42:26 GMT Server: Apache mod_fcgid/2.3.6 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 Location: http://www.xxx.com/ Cache-Control: max-age=3600 Expires: Wed, 06 Jul 2011 12:42:26 GMT Vary: Accept-Encoding Content-Type: text/html; charset=iso-8859-1
                </dd>

                <dd>I got this.. is this right?
                </dd>

                </dl>

                1 Reply Last reply Reply Quote 0
                • 3Amigos
                  3Amigos last edited by Jul 6, 2011, 8:37 AM Jul 6, 2011, 8:37 AM

                  This is a useful link for you:

                  http://www.webconfs.com/how-to-redirect-a-webpage.php

                  Best,

                  C

                  1 Reply Last reply Reply Quote 0
                  • seomagnet
                    seomagnet last edited by Jul 6, 2011, 6:04 AM Jul 6, 2011, 6:04 AM

                    There are few safe ways you can re-direct your domain from non-www to www, they include:

                    • having a small code in your .htaccess if you are running linux

                    • in your header, you can specify where to redirect your site

                    We need to know the sort of platform your site is running on i.e. Windows; Linux as well as the platform or scripting language you are using i.e. asp; .NET or php

                    Also make sure in your webmaster tools to allow Google to know which one to use, so in your webmaster tools specify you want to use the www or non-www

                    Hope this helps, if you need more advice or help let me know

                    1 Reply Last reply Reply Quote 0
                    • KeriMorgret
                      KeriMorgret @healers last edited by Jul 6, 2011, 4:23 PM Jul 5, 2011, 10:12 PM

                      To see if you did it correctly, put in the non-www domain into a server header checker like http://www.seoconsultants.com/tools/check-server-headers-tool/ and see if it uses a 301 redirect to redirect to the www domain (or vice versa, if you set it to remove the www).

                      If that didn't work, we're happy to help walk you through doing this! What we'll need from you is a little more information about your server. Specifically, if you're using IIS or Apache, and if you're using a content management system. That will help us give you the right info if you still need help.

                      healers KeriMorgret 3 Replies Last reply Jul 6, 2011, 4:22 PM Reply Quote 2
                      • healers
                        healers last edited by Jul 5, 2011, 8:34 PM Jul 5, 2011, 8:34 PM

                        i think i did it... 🙂

                        KeriMorgret 1 Reply Last reply Jul 5, 2011, 10:12 PM Reply Quote 0
                        • 1 / 1
                        1 out of 11
                        • First post
                          1/11
                          Last post

                        Got a burning SEO question?

                        Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.


                        Start my free trial


                        Browse Questions

                        Explore more categories

                        • Moz Tools

                          Chat with the community about the Moz tools.

                        • SEO Tactics

                          Discuss the SEO process with fellow marketers

                        • Community

                          Discuss industry events, jobs, and news!

                        • Digital Marketing

                          Chat about tactics outside of SEO

                        • Research & Trends

                          Dive into research and trends in the search industry.

                        • Support

                          Connect on product support and feature requests.

                        • See all categories

                        Related Questions

                        • jonathanboatwright

                          Attending MozCon 2015 and Interested in Connecting with Marketing Professionals

                          Specifically interested in meeting other real estate marketing professionals. Would love to start a forum for the guest list here. Let's connect!
                          Brittanie Flegle
                          @brittanieflegle also posting as @realtyaustin
                          brittanie@realtyaustin.com

                          Industry Events | May 11, 2015, 6:32 PM | jonathanboatwright
                          2
                        • Kenaum

                          How to increase pageviews for a news website when all the most common SEO strategies were already used, and they´ve reached a plateau of visits?

                          These clients are regional news’ websites which have already reached their apex of visits - most of these results were linked to the SEO strategies developed by our team in the past few years. But now, the most common SEO strategies don't show the same effect: a higher number of pageviews. What kind of strategies you suggest to increase this number? Thank you!

                          Industry Events | Mar 4, 2015, 4:44 AM | Kenaum
                          1
                        • Andy-Halliday

                          Going to Mozcon - what to do in Seattle

                          Hi I know this isn't technically an SEO question, but wanted people's advice. As I am flying half way round the world I am actually arriving on the Friday and have Friday evening, Saturday and Sunday to go and explore Seattle. I plan on going to watch a baseball game and visit the home of Starbucks (and I hate coffee, but thought might as well visit), but what else would people recommend doing / seeing in Seattle. Thanks in Advance Andy

                          Industry Events | Feb 12, 2015, 4:18 PM | Andy-Halliday
                          2
                        • DR70095

                          Is It Possible To Use Multiple Promotional Codes for Google AdWords?

                          I am managing two separate Google AdWords accounts and with one I was able to add 3 different promotional codes so I got $300 of Google AdWords for free. I signed up for Google AdWords for another business with a separate login e-mail address. I used the code that I was able to generate and a few days later I recieved an additional code in the mail. I tried to use this code and it said I was only able to use one promotional code per account. Does anyone know why Google has this inconsistency? Was I just lucky the first time or is it possible to use multiple vouchers? Thanks

                          Industry Events | Nov 14, 2014, 10:25 PM | DR70095
                          0
                        • ThompsonPaul

                          [UPDATED] Any Q&A Regulars Attending MozCon Next Week?

                          [Update] Between here and the MozCon Facebook Group we've got a number of folks interested, so we're going to grab a table together for lunch on Tuesday at the conference. I'll try to mark it with something noticeable, or you can tweet me @thompsonpaul and I'll let you know where to find us. Hope to see lots of us there! [/Update] Hey gang - I'm wondering which Q&A regular (or irregular!) contributors are coming to MozCon next week? I know Dana Tan and Marie Haynes are for sure. So who else is coming? If there's a bit of a gang of us, it would be fun to connect up for a lunch table or a drink at some point during the event to meet each other face-to-face. Let me know in the comments, and if there are enough of us, I'll set something up. Paul

                          Industry Events | Jul 21, 2014, 10:28 PM | ThompsonPaul
                          1

                        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
                        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 - 2025 SEOMoz, Inc., a Ziff Davis company. All rights reserved. Moz is a registered trademark of SEOMoz, Inc.
                        • Accessibility
                        • Terms of Use
                        • Privacy

                        Looks like your connection to Moz was lost, please wait while we try to reconnect.