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. Intermediate & Advanced SEO
    4. Canonical Fix Value & Pointer To Good Instructions?

    Canonical Fix Value & Pointer To Good Instructions?

    Intermediate & Advanced SEO
    3 3 918
    • 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.
    • DenisL
      DenisL last edited by

      Could you tell me whether the "canonical fix" is still a relevant and valuable SEO method?

      I'm talking about the .htaccess (or ISAPI for Microsoft) level fix to make all of the non-www page URLs on a website redirect to the www. version - so that SEO "value" isn't split between the two.

      I'm NOT talking about the newer <rel= canonical="" http:="" ...="">tag that goes in the HEAD section on an HTML page - as a fix for some duplicate content issues (I guess).  </rel=>

      I still hear about the latter, but less about the former.  But the former is different than the latter right - it doesn't replace it?

      And I'm not sure if the canonical fix is relevant to a WordPress-based website - are you?

      Also I can never find any page or article on the Web, etc. that explains clearly how to implement the canonical fix for Apache and Microsoft servers. Could you please point me to one?

      Thanks in advance!

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

        Hi Denis.

        When you refer to "canonical" most everyone will believe you are referring to the canonical meta tag.

        With respect to the .htaccess "fix" you are referring to, it is a 301 redirect. When you purchase a domain such as "myexample.com", you are buying rights to a combination of a Top Level Domain (such as .com) plus a domain. You can add "www" or almost any prefix to the domain, but that is referred to as a sub-domain.

        The confusion: when the internet began most site names used the "www" subdomain to represent themselves. It became a standard. Later some site owners wanted to shorten their URL and dropped the subdomain. To help this process most hosts set a default to where the www subdomain mirrors the root domain. This mirroring is NOT required and does not occur on all servers. Any site could should to show completely different content on their www subdomain from their root domain. Simply put, www.myexample.com <> myexample.com. They are two different URLs which could show completely different content.

        Search engines understand the above information and therefore if your site does not contain a proper 301 redirect or other adjustment for your www vs non-www URL format, your website will be duplicated. When users search for your web pages, some will appear in the search engines index with the www prefix, and others without. The real issue is when users link to your website, they will link to both formats of the URL and thereby split your backlink authority. This is a major SEO issue.

        To fix the problem a 301 redirect needs to be placed using a Regex expression. Regex is a replacement computing language. The statement basically will say "if anyone tries to access a web page on my site that does not show a sub-domain, redirect the user to the same page on the www subdomain".

        This process is still highly relevant to SEO, and will continue to be relevant for years. The only way for it to realistically stop being relevant is for servers to stop mirroring the www and non-www URLs. This process is relevant to WordPress and every website regardless of what software is chosen to produce the site.

        The HTACESS code is below. I do not work with IIS so perhaps someone else can assist you with that code. Either way, you likely have managed hosting in which case I highly advise you asking your web service provider to make the change. The .htaccess file controls all access to your site. The slightest error of any nature can instantly bring your site offline, or cause major SEO or security issues. Even using the correct code in the wrong order can cause issues. It is simply not a place for anyone other then a trained web server tech to be working.

        Redirect www to non-www:

        RewriteEngine On
        RewriteBase /
        RewriteCond %{HTTP_HOST} ^www.yourdomain.com [NC]
        RewriteRule ^(.*)$ http://yourdomain.com/$1 [L,R=301]
        
        

        Redirect non-www to www:

        RewriteEngine On
        RewriteBase /
        RewriteCond %{HTTP_HOST} ^yourdomain.com [NC]
        RewriteRule ^(.*)$ http://www.yourdomain.com/$1 [L,R=301]
        
        
        1 Reply Last reply Reply Quote 3
        • AlanMosley
          AlanMosley last edited by

          Yes it is still relevant, the www is a old unix standard but is not nesasary today and i believe makes domain names less memerable and is a confusion when talking of root and sub domains.

          Your in luck, I just finished a tutoiral for microsoft IIS servers. i will be doing more including how to do this in code, but for now, i only have the Domain name fix

          http://perthseocompany.com.au/seo/tutorials

          1 Reply Last reply Reply Quote 0
          • 1 / 1
          • First post
            Last post
          • Href Lang & Canonical Tags
            BeckyKey
            BeckyKey
            0
            3
            1.3k

          • Pagination & Canonicals
            BeckyKey
            BeckyKey
            0
            11
            251

          • Pagination, Canonical, Prev & Next
            Dr-Pete
            Dr-Pete
            0
            5
            2.0k

          • Technical Automated Content - Indexing & Value
            jonmifsud
            jonmifsud
            0
            6
            123

          • I have a question regarding parking good value domain.
            FedeEinhorn
            FedeEinhorn
            0
            3
            129

          • Affiliate & canonicals
            Richard555
            Richard555
            0
            5
            93

          • How to fix a canonical problem with no htaccess?
            bronxpad
            bronxpad
            0
            3
            757

          • Canonical & noindex? Use together
            davidfricks
            davidfricks
            1
            3
            1.6k

          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