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. SEO Tactics
  3. Technical SEO
  4. 302 or 301 redirect to https ?

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.

302 or 301 redirect to https ?

Technical SEO
4
9
35.7k
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.
  • Kotkov
    Kotkov last edited by Feb 18, 2012, 10:41 PM

    I am redirecting whole site to https. Is there a difference between 302 or 301 redirect for seo?

    Site never been indexed.

    Planning to do that with .htaccess command

    RewriteCond %{HTTPS} !=on
    RewriteRule ^(.*) https://%{SERVER_NAME}/$1 [R,L]

    There are plenty of ways http://www.askapache.com/htaccess/ssl-example-usage-in-htaccess.html

    Which way would be the best?

    Thanks is advance

    1 Reply Last reply Reply Quote 0
    • Kotkov
      Kotkov @Virrtuo last edited by Feb 19, 2012, 4:19 AM Feb 19, 2012, 4:19 AM

      Thanks,

      Yes the site from the beginning will be https. We do have a good server, site speed according to google speed tool is 93.

      Sha, added  [R=301,L] and now it's 301.

      1 Reply Last reply Reply Quote 0
      • Virrtuo
        Virrtuo last edited by Feb 19, 2012, 2:59 AM Feb 19, 2012, 2:59 AM

        HTTPS based sites normally add a little stress to the server for handling requests, make sure you are hosted on a good performance web host for users & search engines to access content fast. If you're making HTTPS as the default version and if bots take time to crawl your website, it might after your crawl rate (and possibly ranking)

        Just like how we see WWW and non-WWW, HTTP and HTTPS are looked as two different sites by search engines, I'd highly suggest you to go with 301 (permanent) re-direct from the start to save link juice. Keep your SSL certifications valid. If you don't intend to do 301 from start, check your logs often to see if you get any links to HTTP version (as most often people try to link here) and request webmasters to update the link to HTTPS if you want to see your HTTPS version ranking in SERPs.

        My personal suggestion is to stick with one and doing 301 before you launch the site live.

        Cheers

        Kotkov 1 Reply Last reply Feb 19, 2012, 4:19 AM Reply Quote 1
        • ShaMenz
          ShaMenz @wojkwasi last edited by Feb 19, 2012, 2:36 AM Feb 19, 2012, 2:36 AM

          oops,

          Thanks for the pickup 🙂

          1 Reply Last reply Reply Quote 0
          • wojkwasi
            wojkwasi @ShaMenz last edited by Feb 19, 2012, 2:34 AM Feb 19, 2012, 2:34 AM

            Hi Sha - I think you meant Serge not Woj 😉

            But yes, good pick up - I omitted that detail in my hasty reply

            ShaMenz 1 Reply Last reply Feb 19, 2012, 2:36 AM Reply Quote 0
            • ShaMenz
              ShaMenz last edited by Mar 2, 2012, 8:59 PM Feb 19, 2012, 2:06 AM

              Hi Serge,

              The reason your redirect is creating a 302 is that it is an unspecified Redirect.

              Any redirect that is unspecified will by default be seen as a 302 (Temporary)

              To create a 301, you need to specify like this

              [R=301,L]
              

              Hope that helps,

              Sha

              wojkwasi 1 Reply Last reply Feb 19, 2012, 2:34 AM Reply Quote 2
              • wojkwasi
                wojkwasi @Kotkov last edited by Feb 19, 2012, 1:54 AM Feb 19, 2012, 1:53 AM

                301 - try this (in it's simplest form):

                RewriteCond %{SERVER_PORT} 80 
                RewriteRule ^(.*)$ https://www.yoursite.com/$1 [R,L]
                
                1 Reply Last reply Reply Quote 1
                • Kotkov
                  Kotkov @wojkwasi last edited by Feb 19, 2012, 1:36 AM Feb 19, 2012, 1:36 AM

                  Thanks, I understand 301 and 302. This command creates 302. I see a lot of website in serp having 302 to https, but also I see a lot with 301. Which is right for Seo when in comes to https?

                  wojkwasi 1 Reply Last reply Feb 19, 2012, 1:53 AM Reply Quote 0
                  • wojkwasi
                    wojkwasi last edited by Feb 19, 2012, 12:24 AM Feb 19, 2012, 12:24 AM

                    301 = permanent redirection

                    302 = temporary redirection

                    If the change is permanent then 301

                    The htaccess rewrite looks fine 🙂

                    Kotkov 1 Reply Last reply Feb 19, 2012, 1:36 AM Reply Quote 0
                    • 1 / 1
                    1 out of 9
                    • First post
                      1/9
                      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

                    • TaraLP

                      Delete old blog posts after 301 redirects to new pages?

                      Hi Moz Community, I've recently created several new pages on my site using much of the same copy from blog posts on the same topics (we did this for design flexibility and a few other reasons). The blogs and pages aren't exactly identical, as the new pages have much more content, but I don't think there's a point to having both and I don't want to have duplicate content, so we've used 301 redirects from the old blog posts to the new pages of the same topic. My question is: can I go ahead and delete the old blog posts? (Or would there be any reasons I shouldn't delete them?) I'm guessing with the 301 redirects, all will be well in the world and I can just delete the old posts, but I wanted to triple check to make sure. Thanks so much for your feedback, I really appreciate it!

                      Technical SEO | Oct 4, 2019, 2:20 PM | TaraLP
                      1
                    • SamKlep

                      301 redirect syntax for htaccess

                      I'm working on some htaccess redirects for a few stray pages and have come across a few different varieties of 301s that are confusing me a bit....Most sources suggest: Redirect 301 /pageA.html http://www.site.com/pageB.html or using some combination of: RewriteRule + RewriteCond + RegEx I've also found examples of: RedirectPermanent /pageA.html http://www.site.com/pageB.html I'm confused because our current htaccess file has quite a few (working) redirects that look like this: Redirect permanent /pageA.html http://www.site.com/pageB.html This syntax seems to work, but I'm yet to find another Redirect permanent in the wild, only examples of Redirect 301 or RedirectPermanent Is there any difference between these? Would I benefit at all from replacing Redirect permanent with Redirect 301?

                      Technical SEO | Jun 24, 2019, 9:03 AM | SamKlep
                      1
                    • LindsayE

                      What to do with old content after 301 redirect

                      I'm going through all our blog and FAQ pages to see which ones are performing well and which ones are competing with one another. Basically doing an SEO content clean up. Is there any SEO benefit to keeping the page published vs trashing it after you apply a 301 redirect to a better performing page?

                      Technical SEO | Dec 8, 2017, 11:20 AM | LindsayE
                      0
                    • joony

                      Redirecting HTTP to HTTPS - How long does it take Google to re-index the site?

                      hello Moz We know that this year, Moz changed its domain to moz.com from www.seomoz.org
                      however, when you type "site:seomoz.org" you still can find old urls indexed on Google (on page 7 and above) We also changed our site from http://www.example.com to https://www.example.com
                      And Google is indexing both sites even though we did proper 301 redirection via htaccess. How long would it take Google to refresh the index? We just don't worry about it? Say we redirected our entire site. What is going to happen to those websites that copied and pasted our content? We have already DMCAed their webpages, but making our site https would mean that their website is now more original than our site? Thus, Google assumes that we have copied their site? (Google is very slow on responding to our DMCA complaint) Thank you in advance for your reply.

                      Technical SEO | Nov 24, 2014, 11:40 PM | joony
                      0
                    • sjcbayona-41218

                      Rel=Canonical on a page with 302 redirection existing

                      Hi SEOMoz! Can I have the rel=canonical tag on a URL page that has a 302 redirection? Does this harm the search engine friendliness of a content page / website? Thanks! Steve

                      Technical SEO | May 24, 2012, 1:17 AM | sjcbayona-41218
                      0
                    • TrevorMcKendrick

                      301 Redirect with an Exact Domain name Match

                      My Client had a site that ranked for a pretty competitive two word phrase, but for a variety of reasons had to transfer the site to a different domain name (with none of the previous keywords). We've 301'd everything just fine to the new site, but our traffic for that two word phrase, as well as related long tail traffic, is beginning to drop. Could the drop be related to something that we didn't do well in the transfer? Or is it due to the new domain name now not being an exact match? Sitenote question: Our Google Analytics is still set up for the former domain name and shows data just fine. Is there any reason to switch GA to the new domain? What are the pros/cons? Much thanks in advance!

                      Technical SEO | Dec 7, 2011, 7:16 AM | TrevorMcKendrick
                      0
                    • upick-162391

                      Trailing Slashes In Url use Canonical Url or 301 Redirect?

                      I was thinking of using 301 redirects for trailing slahes to no trailing slashes for my urls. EG: www.url.com/page1/ 301 redirect to www.url.com/page1 Already got a redirect for non-www to www already. Just wondering in my case would it be best to continue using htacces for the trailing slash redirect or just go with Canonical URLs?

                      Technical SEO | Nov 27, 2011, 12:19 PM | upick-162391
                      0
                    • steffen_

                      Double 301 redirect

                      Hi together, due to some technical reasons I have redirect (301) an existing link two times. Example: www.mydomain.com/root/site.html > 301 > www.mydomain.com/site.html > 301 www.mydomain.com/site_new.html Is there anybody how has got some experience like doing a double redirect? What about link juice? Best regards Steffen

                      Technical SEO | Sep 18, 2011, 2:39 PM | steffen_
                      0

                    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

                    Access all your tools in one place. Whether you're tracking progress or analyzing data, everything you need is at your fingertips.

                    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.