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. Resolving 301 Redirect Chains from Different URL Versions (http, https, www, non-www)

    Resolving 301 Redirect Chains from Different URL Versions (http, https, www, non-www)

    Technical SEO Issues
    1 1 38
    • 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.
    • theyoungfirm
      theyoungfirm last edited by

      Hi all,

      Our website has undergone both a redesign (with new URLs) and a migration to HTTPS in recent years. I'm having difficulties ensuring all URLs redirect to the correct version all the while preventing redirect chains. Right now everything is redirecting to the correct version but it usually takes up to two redirects to make this happen.  See below for an example. How do I go about addressing this, or is this not even something I should concern myself with?

      Redirects (2)

      <colgroup><col width="123"><col width="302"></colgroup>
      |

      Redirect Type

      |

      URL

      |
      | |

      http://www.theyoungfirm.com/blog/2009/index.html

      301

      |

      https://theyoungfirm.com/blog/2009/index.html

      301

      |

      https://theyoungfirm.com/blog/

      |

      This code below was what we added to our htaccess file. Prior to adding this, the various subdomain versions (www, non-www, http, etc.) were not redirecting properly.  But ever since we added it, it's now created these additional URLs (see bolded URL above) as a middle step before resolving to the correct URL.

      RewriteEngine on

      RewriteCond %{HTTP_HOST} ^www.(.*)$ [NC]

      RewriteRule ^(.*)$ https://%1/$1 [R=301,L]

      RewriteCond %{HTTPS} !on

      RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

      Your feedback is much appreciated. Thanks in advance for your help.

      Sincerely, Bethany

      1 Reply Last reply Reply Quote 0
      • 1 / 1
      • First post
        Last post
      • Recently migrated to https version of volusion site. 301 redirect link chain question
        0
        1
        36

      • Proper 301 redirect code for http to https
        TimHolmes
        TimHolmes
        0
        2
        23.4k

      • SSL, www issue. Should we buy WWW license or just add redirect from www to non-www site?
        Ryan_V
        Ryan_V
        0
        8
        141

      • Has anyone tested or knows whether it makes a difference to upload a disavow file to both www. and non-www. versions of your site in GWMT?
        Chris661
        Chris661
        0
        3
        120

      • Ideally should a 301 or 302 redirect be used from https://www.site.com to http://www.site.com? Is there a valid reason to use a 302 in this situation or would using a 301 have any negative impact on seo?
        Unity
        Unity
        0
        2
        317

      • 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

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

      • 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