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. 301 Redirecting http to https

    301 Redirecting http to https

    Technical SEO Issues
    3 2 663
    • 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.
    • Heydarian
      Heydarian last edited by

      In the Moz Site Crawl issue, I was seeing an error that said we were temporarily redirecting our homepage to https URLs. So I changed the code in htaccess to make it 301 redirect but I'm still getting the same error. I implemented it last week and we just had a new crawl yesterday. Here is the new code:

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

      Does anyone know why I'm still getting 302 redirects?

      Thanks

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

        Hi Nima,

        When I read the examples at: http://support.hostgator.com/articles/apache-mod_rewrite-and-examples I can see a difference between your rewrite rule vs. the one on this site under the section Redirect All Website Pages

        Your rule:
        RewriteEngine on
        RewriteCond %{HTTP_HOST} ^heritagelawmarketing.com [NC]
        RewriteRule ^(.*)$ http://www.heritagelawmarketing.com/$1 [L,R=301,NC]

        Your rule:
        RewriteEngine on
        RewriteCond %{HTTP_HOST} ^olddomain.com**$**
        RewriteRule ^(.*)$ http://www.newdomain.com/$1 [R=301,L]

        Hope this helps.

        André

        Heydarian 1 Reply Last reply Reply Quote 1
        • Heydarian
          Heydarian @ConclusionDigital last edited by

          Thanks Andre. Do you know what the [NC] stands for or accomplishes?

          1 Reply Last reply Reply Quote 0
          • 1 / 1
          • First post
            Last post
          • Switched from and HTTPS to HTTP. My home page is facing a redirect issue from the http to https. Should I no index the HTTP or find the redirect and delete it? Thank you
            LandmarkRecovery2017
            LandmarkRecovery2017
            0
            3
            42

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

          • Do you still loose 15% of value of inbound links when you redirect your site from http to https (so all inbound links to http are being redirected to https version)?
            LoganRay
            LoganRay
            0
            5
            74

          • Responsive web design has a crawl error of redirecting to HTTP instead of HTTPS ? is this because of the new update of google that appreciates the HTTPs more?
            donford
            donford
            0
            2
            129

          • Redirect a 301 Redirect
            RedCaffeine
            RedCaffeine
            0
            5
            98

          • Best method of redirecting http to https on homepage
            Dr-Pete
            Dr-Pete
            0
            7
            1.0k

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

          • I have a site that has both http:// and https:// versions indexed, e.g. https://www.homepage.com/ and http://www.homepage.com/. How do I de-index the https// versions without losing the link juice that is going to the https://homepage.com/ pages?
            fthead9
            fthead9
            0
            3
            729

          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