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.

    • MozCon

      Save on Early Bird tickets and join us in London or New York City

    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

                    • musthavemarketing

                      301 redirects delay in picking up

                      Hi I have been involved in the redesign/development of a website which has up until now had a lot of international traffic.  On day of migration I uploaded all the 301 redirects to the website (wordpress) using Simple 301 redirect plugin.  I tested a number of them and they appeared to be working. I also submitted the new sitemaps to Search Console. Since migration international traffic - particularly from countries such as india, Phillipines, Sri Lanka etc have significantly dropped off whereas the local traffic and some of the international traffic such as USA has remained fairly consistent.  Looking at Analytics and entrances recently it appears as though search results are/were showing a number of pages with 404's (one in particular which received significant traffic and for which I had created a 301 redirection) - I have checked this page using the old url and it re-directs correctly for me and today asked a colleague in India to also check - he is getting the redirection fine.  Does Google.in take a significantly longer time to pick these up in search results? Or am I missing something?

                      Technical SEO | May 26, 2016, 1:40 AM | musthavemarketing
                      0
                    • Kilgray

                      Robots txt. in page with 301 redirect

                      We currently have a a series of help pages that we would like to disallow from our robots txt. The thing is that these help pages are located in our old website, which now has a 301 redirect to current site. Which is the proper way to go around? 1- Add the pages we want to disallow to the robots.txt of the new website? 2- Break the redirect momentarily and add the pages to the robots.txt of the old one? Thanks

                      Technical SEO | Mar 7, 2016, 2:13 PM | Kilgray
                      0
                    • ptapley

                      Meta descriptions and h1 tags during a 301 redirect

                      My employer is shifting to a new domain and i am in the midst of doing URL mapping. I realize that many of the meta descriptions and H1 tags are different on the new pages - is this a problem ? Thank you.

                      Technical SEO | May 28, 2015, 3:56 AM | ptapley
                      0
                    • Veva

                      Can I remove 301 redirects after some time?

                      Hello, We have an very large number of 301 redirects on our site and would like to find a way to remove some of them. Is there a time frame after which Google does not need a 301 any more? For example if A is 301 redirected to B, does Google know after a while not to serve A any more, and replaces any requests for A with B? How about any links that go to A? Or: Is the only option to have all links that pointed to A point to B and then the 301 can be removed after some time? Thank you for you you help!

                      Technical SEO | Oct 1, 2012, 5:16 PM | Veva
                      0
                    • Squall315

                      Will bad things happen if I cancel 301 site redirect?

                      Hi, please someone help! We have two identical websites, say A & B. Because of the not so good SEO establishment, site B was built and site A was 301 redirected to site B weeks ago. For some reasons, we have to reuse site A, which means we have to cancel the 301 redirection. (Sound a little crazy) So the question are: 1. Can we conduct the action? 2. If we cant, what's the reason? 3. If we can, what would be the best practice? Thanks for help in advance! Plus: we also CARE what would happen to site B if the 301 is cancelled? Will it grow healthy like a new site?

                      Technical SEO | Apr 25, 2012, 10:28 PM | Squall315
                      0
                    • SamTurri

                      Any way around buying hosting for an old domain to 301 redirect to a new domain?

                      Howdy. I have just read this QA thread, so I think I have my answer. But I'm going to ask anyway! Basically DomainA.com is being retired, and DomainB.com is going to be launched. We're going to have to redirect numerous URLs from DomainA.com to DomainB.com. I think the way to go about this is to continue paying for hosting for DomainA.com, serving a .htaccess from that hosting account, and then hosting DomainB.com separately. Anybody know of a way to avoid paying for hosting a .htaccess file on DomainA.com? Thanks!

                      Technical SEO | Dec 7, 2011, 2:37 PM | SamTurri
                      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
                    • 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

                    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
                    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.