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. Best Practice for www and non www

    Best Practice for www and non www

    Technical SEO Issues
    4 3 8.4k
    • 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.
    • I.AM.Strategist
      I.AM.Strategist last edited by

      How is the best way to handle all the different variations of a website in terms of www | non www | http | https?

      In Google Search Console, I have all 4 versions and I have selected a preference.

      In Open Site Explorer I can see that the www and non www versions are treated differently with one group of links pointing to each version of the same page. This gives a different PA score.

      eg.

      1. http://mydomain.com DA 25 PA 35
      2. http://www.mydomain.com DA 19 PA 21

      Each version of the home page having it's only set of links and scores.

      Should I try and "consolidate" all the scores into one page?

      Should I set up redirects to my preferred version of the website?

      Thanks in advance

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

        Hi Samantha,

        What you have is what are called "canonical issues." By allowing multiple versions of your domain open and crawlable to search engines you "split" your ranking authority and result in the issues you are seeing right now.

        The best practice is to choose one version of your domain as the "true canonical" and then 301 redirect the others at the server level by means of mod_rewrite code. Doing so will consolidate your content, incoming links and PageRank and greatly increase the root domain authority of your site.

        To search engines, if your site hasn't instituted 301 redirect commands at the server level, all of these versions of your site home page would be treated as "separate pages" and each would accumulate authority individually:

        http://yoursite.com/
        http://www.yoursite.com/
        http://yoursite.com/index.php
        http://www.yoursite.com/index.php
        https://yoursite.com
        https://www.yoursite.com

        You get the idea.

        Most websites are run on one of three different types of servers...

        • Unix-based servers running Apache.
        • Unix-based servers running Nginx.
        • Microsoft Windows-based servers running IIS or similar.

        If you're unsure of what kind of server runs your site, ask your hosting company. Most sites are run on Unix-based servers with Apache. In that case, the server's behavior is configured using something called the .htaccess file.

        If your site's root domain already contains a .htaccess file, you can simply scroll to the end of whatever code is already there and append your 301 redirect code at the bottom of the file, starting on a new line. While this may sound complicated, it's actually very, very simple to do. If you can upload files to and from your Web server, then chances are you'll have no trouble managing (i.e. altering or creating and uploading) your .htaccess file(s).

        But yes, bottom line, you ALWAYS want to consolidate URLs and present one uniform "preferred" URL format to search engines and users. In your case, that would appear to the be the non-www domain which has the higher Domain Authority.

        You can learn all about redirection best practices at the Moz resource here: https://moz.com/learn/seo/redirection

        I.AM.Strategist salem4e 2 Replies Last reply Reply Quote 8
        • I.AM.Strategist
          I.AM.Strategist @mediawyse last edited by

          Thanks for taking the time to put together such a wonderfully detailed answer.

          1 Reply Last reply Reply Quote 0
          • salem4e
            salem4e @mediawyse last edited by

            thanks for your answer

            that was helpful

            1 Reply Last reply Reply Quote 0
            • 1 / 1
            • First post
              Last post
            • Worth redirecting non-www to www due to higher page authority with www?
              GastonRiera
              GastonRiera
              0
              4
              276

            • WWW to Non-WWW = Less Indexing?
              BradyDCallahan
              BradyDCallahan
              0
              3
              178

            • Best Practice - Disavow tool for non-canonical domain, 301 Redirect
              Andy.Drinkwater
              Andy.Drinkwater
              0
              2
              260

            • Redirecting non-www to www
              Christy-Correll
              Christy-Correll
              0
              6
              466

            • Having www. and non www. links indexed
              AdamThompson
              AdamThompson
              0
              6
              370

            • Difference between www and non-www site
              Cyrus-Shepard
              Cyrus-Shepard
              0
              6
              7.8k

            • Www vs non-www
              kylesuss
              kylesuss
              0
              6
              808

            • How do I redirect non-www to www in IIS?
              tylerfraser
              tylerfraser
              0
              2
              986

            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