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

                    • CitimarineMoz

                      How effective are 301 redirects in passing page rank?

                      301 redirect page rank

                      I have a blog which is ranking well for certain terms, and would like to repurpose it to better explain these terms it is ranking for, including updating the url to the new term the blog will be about. The plan being to 301 redirect the old url to new. In the past, I've done this with other pages, and have actually lost much of the rankings that I had earned on the original URL. What is your take on this? Maybe repurpose blog, but maintain original URL just to be on the safe side? Thanks

                      Technical SEO | May 22, 2022, 1:51 PM | CitimarineMoz
                      0
                    • LouisPortier

                      Redirection chain and Javascript Redirect

                      Hi, A redirection chain is usually defined as a page redirecting to another page which itself is another redirection. URL1 ---(301/302)---> URL2 ---(301/302)---> URL3 But what about Javascript redirect? They seem to be a different beast: URL1 ---(301/302)---> URL2 ---(200 then Javascript redirect)---> URL3 From what I know if the javascript redirect is instant Google counts it as a 301 permanent redirection, but I'm still not sure about if this counts as a redirection chain. Most of the tools (such as moz) only see the first redirection. So is that scenario a redirection chain or no?

                      Technical SEO | May 4, 2024, 11:09 AM | LouisPortier
                      0
                    • alstam

                      301 redirect from dynamic url to static page

                      Hi, i want to redirect from this old link http://www.g-store.gr/product_info.php?products_id=1735/ to this one https://www.g-store.gr/golf-toualetas.html I have done several attempts but with no result. I anyone can help i will appreciate. My website runs in an Apache server with cpanel. Thank you

                      Technical SEO | Dec 17, 2018, 4:22 AM | alstam
                      0
                    • 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
                    • HeroDesignStudio

                      301 Redirects, Sitemaps and Indexing - How to hide redirected urls from search engines?

                      We have several pages in our site like this one, http://www.spectralink.com/solutions, which redirect to deeper page, http://www.spectralink.com/solutions/work-smarter-not-harder. Both urls are listed in the sitemap and both pages are being indexed. Should we remove those redirecting pages from the site map? Should we prevent the redirecting url from being indexed? If so, what's the best way to do that?

                      Technical SEO | Aug 11, 2016, 8:57 AM | HeroDesignStudio
                      0
                    • Juandbbam

                      301 redirect from Blogger

                      Hello, I have a client with a Wordpress network of blogs, each blog is owned by a different blogger. Many of them were migrated time ago from Blogger. I have seen that the way used to redirect them is a meta refresh, so no authority is being passed. I cannot find any reliable way of making a 301 from Blogger, There are some plugins, but I'm afraid of using them. Any of you have experience with this situation please? I have even thought about placing a global rel canonical before the meta refresh, but I think that here the problem is the meta refresh itself.... Thank you in advance

                      Technical SEO | Jan 16, 2013, 4:33 AM | Juandbbam
                      0
                    • BaseKit

                      How to safely reduce the number of 301 redirects / should we be adding so many?

                      Hi All, We lost a lot of good rankings over the weekend with no obvious cause. Our top keyword went from p3 to p12, for example. Site speed is pretty bad (slower than 92% of sites!) but it has always been pretty bad. I'm on to the dev team to try and crunch this (beyond image optimisation) but I know that something I can effect is the number of 301 redirects we have in place. We have hundreds of 301s because we've been, perhaps incorrectly, adding one every time we find a new crawl error in GWT and it isn't because of a broken link on our site or on an external site where we can't track down the webmaster to fix the link. Is this bad practice, and should we just ignore 404s caused by external broken URLs? If we wanted to reduce these numbers, should we think about removing ones that are only in place due to external broken URLs? Any other tips for safely reducing the number of 301s? Thanks, all! Chris

                      Technical SEO | Oct 5, 2011, 11:14 AM | BaseKit
                      0
                    • dim_d

                      Why is a 301 redirected url still getting indexed?

                      We recently fixed a redirect issue in a website, and although it appears that the redirection is working fine, the url in question keeps on getting crawled, indexed and cached by google. The redirect was done a month ago, and google shows cached version of it, even for a couple of days ago. Manual checking shows that its being redirected, and also a couple of online tools i checked report a 301 redirect. Do you have any idea why this could be happening? The website I'm talking about is www.hotelmajestic.gr and its being redirected to www.hotel-majestic.gr

                      Technical SEO | May 10, 2011, 6:42 AM | dim_d
                      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.