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.

      What is your Brand Authority?
      Moz

      What is your Brand Authority?

      Check yours now
    • 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. Intermediate & Advanced SEO
    4. Login redirect 302

    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.

    Login redirect 302

    Intermediate & Advanced SEO
    3
    9
    3251
    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.
    • coremediadesign
      coremediadesign last edited by

      Ok - anyone knows what to do with the temporary redirect to the login page?

      In our e-commerce system we have a checkout page, which requires user to be logged in - if they are not, we redirect them to the login page using simple php header("Locaiton: url"). This however has been found as a Warning as it's a temporary redirect. I can't really put there permanent redirect for obvious reasons so if someone could give me some clue on this situation that would be much appreciated.

      1 Reply Last reply Reply Quote 0
      • Anthony_NorthSEO
        Anthony_NorthSEO @coremediadesign last edited by

        No problem at all. Glad I could help. I think you've got it under control. I tend to over-think things a little bit after a long night, haha.

        Last two cents...

        There's a Magento extension I use on one of my stores that's very similar to what you're thinking of.

        On the checkout page, the very first form requires the user to enter the billing info (just name, email, address, etc... not payment info), as well as password, and has a checkbox that asks the user if they would like to "Register for Future Convenience."

        Above this first form there's a simple a link at the top that says "Already Registered? Login here." which replaces the billing info form with a login form if clicked.

        I think something like that would work perfectly for your situation, you'd just need the addition of a password field to the billing info section, and a link that replaces the billing section with a login form when clicked. Depending on which method/form is displayed your button text would either be "Login and Continue" or "Register and Continue."

        For new users who need to register, the only additional step as opposed to a "Guest Checkout" would be filling out a password field.

        Good luck man.

        -Anthony

        1 Reply Last reply Reply Quote 0
        • coremediadesign
          coremediadesign @coremediadesign last edited by

          Thanks Anthony,

          I'm glad you like the site 😉

          I think I'm going to simply display login form directly on the checkout page if user is not logged and use canonical url to inform the crawlers that it is serving login page. We don't have access restriction to the basket so we shouldn't have a problem with it and out registration and login forms are on the separate pages - so again, these could be easily indexed by search engines.

          Thanks for the advice - much appreciated!

          1 Reply Last reply Reply Quote 0
          • AlanMosley
            AlanMosley @coremediadesign last edited by

            Its not the link juice of the checkout page, its the link juice of the link pointing to the checkout page that is wasted.

            if you did not have a link to the checkout page at all, but rather a link like login.aspx?url=checkout.aspx then you could redirect after the login, you would need a canonical in the login page to cater for the url parameter, but this way the link juice would go to the login page that is not behind authentication, and as long as you have a link back to the home page the link jucie would be returned. This way you will no longer have the warning, nor would you have the link juice leak

            1 Reply Last reply Reply Quote 0
            • coremediadesign
              coremediadesign @AlanMosley last edited by

              Thanks Alan - although I'm not sure what your suggestion to the problem is here.

              We do have the redirect after login to point back to the checkout, but this isn't really the problem.

              The fact that checkout is redirecting to the login is what the problem is referring to.

              I'm not bothered whether search engines will drop the juice to the checkout page as it's behind the login anyway - I just want to make sure that the Warning is gone saying that there's a temporary redirect.

              From what I can see the only way to do it is to serve the login page if they are not logged in under the checkout url and use canonical url to indicate that it is in fact the url of the login page.

              It is a shame though that there isn't an option to inform search engines that the page they are trying to access is login protected.

              AlanMosley 1 Reply Last reply Reply Quote 0
              • Anthony_NorthSEO
                Anthony_NorthSEO @coremediadesign last edited by

                Hey Sebastian,

                I took a look at your site and I see what you're saying about guest checkout. Very nice by the way. I'm definitely going to keep your contact info handy so I'll have it the next time I need a custom modules built.

                I do think adding the login form to the basket.html page would be the best way to go in this case. The only problem with that is if the user clicks on the Checkout button and bypasses the View Basket page...

                Again, my php skills are horrible but I guess the general idea for the rule would be something like this:

                For basket.html - if userisnotloggedin then echo HTML for the login form above the current basket.html content.

                For checkout.html - if userisnotloggedin then echo HTML for login form above the current checkout.html content.

                The problem with this scenario is that if the user isn't registered, you'd aslo need to dynamically display the HTML from register.html on the basket or checkout page when a user clicks "Register Now", instead of redirecting to a new page.

                Could get a little complicated but it should eliminate the 302 warning.

                Also, when I created an account I noticed I had to confirm it, so unless you've had problems with fake accounts, I'd  remove that step from the conversion process.

                Personally, I use the robots.txt file to disallow robot access to all of my cart, checkout, and account pages (login, register, or after login). The only drawback is you don't have the "Register" page indexed, but I don't think it's very likely that a user would land on a Registration page from a search engine result and proceed to register for a site without viewing any other content first.

                Removing those pages from the index, combined with adding a no-follow tag to the View Basket and Checkout buttons links should get rid of the 302 error and any duplicate content issues without having to change your conversion flow, which seems to be very straightforward and user-friendly as it is.

                It seems like you've got the skills to make it happen either way though, and keeping a user on the checkout page instead of redirecting them somewhere else never hurts.

                I don't think the 302 warning will be affect your rankings much as it is, but to wrap it up... I'd either add the necessary Login and Registration forms to both the basket and checkout pages (only if the user isn't logged in) or disallow indexing of those pages and no-follow any links pointing to them, so the 302 isn't an issue.

                -Anthony

                1 Reply Last reply Reply Quote 1
                • AlanMosley
                  AlanMosley last edited by

                  You can send people directly to the login page and then send them to the checkout page when loged in.

                  You can allow googles ip to go to the page without authentication, but you might be seen as cloacking.

                  You could show a login on checkout page then, with ajax show page after login,

                  Or you can leave it how it is. Your only problem is that you are wasting link juice on the link that gets 302'ed

                  I prefere option 1, use a parameter to pass final destination, but put a canonical tag in the login page, make sure you have a link on the login page back to your home page to get the link juice back

                  coremediadesign 1 Reply Last reply Reply Quote 0
                  • coremediadesign
                    coremediadesign @Anthony_NorthSEO last edited by

                    Thanks Anthony,

                    The system is custom built so I can modify it the way I really need, however I cannot  allow guest checkout as each purchase is associated with the account and in order to access goods (which in this case are video tutorials) user has to have an account so it wouldn't work that well in this situation.

                    An option perhaps would be to display login on the checkout page if user is not logged in, however in this case I will have a problem with duplicate content, unless I use the canonical url to indicate that checkout page is actually serving the login page.

                    We don't provide the after login access to the crawlers so that shouldn't be a big problem I guess.

                    Do you think this scenario would work?

                    Anthony_NorthSEO coremediadesign 3 Replies Last reply Reply Quote 0
                    • Anthony_NorthSEO
                      Anthony_NorthSEO last edited by

                      Hi Sebastian,

                      What eCommerce platform are you using?

                      To be honest, I think the best solution would be to allow users to checkout without being logged in. Most eCommerce stores allow Guest Checkout because a lot of customers don't want to be forced to create a permanent account in order to make a purchase. I'm pretty positive you'd see an increase in Conversion Rate if you enable users to make purchases as guests.

                      If that's not an option for some reason, you might try letting the user create the account during the checkout process rather than redirecting them to the normal account creation page.

                      I'm pretty sure there's a way to redirect users to a page without using a 302 via php, but I'm far from being an expert in that language. On my eCommerce site if a customer clicks a link like "Order Tracking" or "Order History" without being logged in they're first taken to the login page, and then after logging in they're redirected to the original page that was requested. I'm not showing any 302 warnings from these links though. I'm using Magento, and while I'm very well versed in that CMS, I've got very little experience with other eCommerce platforms and can't really help you out with anything technical.

                      Again, I definitely think the best course of action would be to allow non-registered users to make purchases, which would eliminate the problem entirely and increase conversions.

                      Hope this helps and good luck!

                      -Anthony

                      coremediadesign 1 Reply Last reply Reply Quote 1
                      • 1 / 1
                      • First post
                        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

                      • MikeBlue1

                        301 Redirect - Rank Recovery Examples?

                        Hi All, I recently did a 301 redirect. Page to Page and the notified google via its console. Its been 6 days since. The home page and one other high traffic page swopped out with the new domain on google search index with 3-4 drops in ranking for each. The rest of the sites pages have been indexed but still reflect the old domain when searched. Recently today my home page dropped even further to the second page of google index for the specific keyword. Can you share similar experiences and how long it took you to recover rank fully? and how long for all pages to swop out on google search's index? Regards Mike

                        Intermediate & Advanced SEO | | MikeBlue1
                        0
                      • Jes-Extender-Australia

                        Htaccess - Redirecting TAG or Category pages

                        Hello Fellow Moz's, We have an issue redirecting some /TAG and /Category pages to inner pages. As an example we use: RedirectMatch 301 /category/Sample-Category(.*) https://OurDomain.com.au/New-Page//$1 That works well. The issue is we have other categories and tags that are named similar to /Sample-Category As an example, if we try to redirect /Sample-Category-1 to /New-Page-1 - it will not work, and redirects to /New-Page I assume this is because /Sample-Category is already being redirected, so anything after /Sample-Category like -1 or -2 or -3 etc, will not be recognized. Anyone know of a workaround?

                        Intermediate & Advanced SEO | | Jes-Extender-Australia
                        0
                      • EcommRulz

                        Does Google Index URLs that are always 302 redirected

                        Hello community Due to the architecture of our site, we have a bunch of URLs that are 302 redirected to the same URL plus a query string appended to it. For example: www.example.com/hello.html is 302 redirected to www.example.com/hello.html?___store=abc The www.example.com/hello.html?___store=abc page also has a link canonical tag to www.example.com/hello.html In the above example, can www.example.com/hello.html every be Indexed, by google as I assume the googlebot will always be redirected to www.example.com/hello.html?___store=abc and will never see www.example.com/hello.html ? Thanks in advance for the help!

                        Intermediate & Advanced SEO | | EcommRulz
                        0
                      • Sandicliffe

                        301 Redirect Showing Up as Thousands Of Backlinks?

                        Hi Everyone, I'm currently doing quite a large back link audit on my company's website and there's one thing that's bugging me. Our website used to be split into two domains for separate areas of the business but since we have merged them together into one domain and have 301 redirected the old domain the the main one. But now, both GWT and Majestic are telling me that I've got 12,000 backlinks from that domain?  This domain didn't even have 12,000 pages when it was live and I only did specific 301 redirects (ie. for specific URL's and not an overall domain level 301 redirect) for about 50 of the URL's with all the rest being redirected to the homepage. Therefore I'm quite confused about why its showing up as so many backlinks - Old redirects I've done don't usually show as a backlink at all. UPDATE: I've got some more info on the specific back links. But now my question is - is having this many backlinks/redirects from a single domain going to be viewed negatively in Google's eyes? I'm currently doing a reconsideration request and would look to try and fix this issue if having so many backlinks from a single domain would be against Google's guidelines. Does anybody have any ideas? Probably somthing very obvious. Thanks! Sam

                        Intermediate & Advanced SEO | | Sandicliffe
                        0
                      • BohmKalish123

                        How to handle individual page redirects on Wix?

                        I switched from one domain to another because I wanted a domain that had our company name so it was more brand-y. However, the old domain had better DA/PA. Originally I set up a global 301 from the old to the new, but now I'm finding that I actually need to set up individual 301's from each URL of the old site, or at least from each page. However, I am using Wix so it looks like I can't always do URL-URL 301's, although I can redirect any URL to a page on the new website. The problem is that, in some cases, the content on the new site is different (or, for example, I can only link a particular blog post on the old site back to the new site's blog's main page). How closely do URLS/pages need to resemble each other for link juice to be transferred? Also, should I try to set up all these redirects manually or bite the bullet and go back to using the old domain? The problem is that I did a lot of beginner SEO junk for the new domain, like submitting to a few higher-quality directories, and getting our website on various industry resource sites, etc. I'd need to re-do this entirely if I go back to the old page.  What do you think?

                        Intermediate & Advanced SEO | | BohmKalish123
                        0
                      • MattBarker

                        Does a 302 redirect pass penalties?

                        I'm having problems finding a definitive answer to this question, there is a lot of rumour and gossip out there but nothing I can rely on. I'm working with a site that received an unnatural links notice followed by a massive drop in search traffic. Looking at the link profile it's pretty much jacked beyond repair and I have recommended that we move over to a fresh domain. However, it's an established brand with many more sources of traffic than organic search. There's no way we can burn all their repeat visits, loyal customers, brand recognition that they've built up over the years so I want to redirect from the old domain to the new.  This is not to try and make any SEO gain from the previous site, frankly we don't give a crap about that. We just want to maintain the brand. A 302 is a temporary redirect, this will be a permanent move BUT a 301 will pass on the penalty.  So can we safely use a 302 redirect in this situation or is there a better alternative (meta refresh?) Thanks for your help! MB.

                        Intermediate & Advanced SEO | | MattBarker
                        0
                      • desmond.liang

                        Our login pages are being indexed by Google - How do you remove them?

                        Each of our login pages show up under different subdomains of our website. Currently these are accessible by Google which is a huge competitive advantage for our competitors looking for our client list. We've done a few things to try to rectify the problem: -  No index/archive to each login page Robot.txt to all subdomains to block search engines gone into webmaster tools and added the subdomain of one of our bigger clients then requested to remove it from Google (This would be great to do for every subdomain but we have a LOT of clients and it would require tons of backend work to make this happen.) Other than the last option, is there something we can do that will remove subdomains from being viewed from search engines? We know the robots.txt are working since the message on search results say: "A description for this result is not available because of this site's robots.txt – learn more." But we'd like the whole link to disappear.. Any suggestions?

                        Intermediate & Advanced SEO | | desmond.liang
                        1
                      • julienraby

                        Redirect a subdomain to a subdirectory for SEO purposes.

                        Hi, I have a site on wordpress and I want to add eCommerce to it. We want to go with Shopify but Shopify only allows to host their platform on a subdomain. I like to have it on a subdorectory, so my question is: Would it make sense to redirect the whole subdomain to a subdirectory (move everything from shop.domain.com to domain.com/shop) for SEO purposes? Would Google see these pages as if they were part of the main domain? Thanks! Julien

                        Intermediate & Advanced SEO | | julienraby
                        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
                      • 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.