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

                      • amag

                        Would You Redirect a Page if the Parent Page was Redirected?

                        Hi everyone! Let's use this as an example URL: https://www.example.com/marvel/avengers/hulk/ We have done a 301 redirect for the "Avengers" page to another page on the site. Sibling pages of the "Hulk" page live off "marvel" now (ex: /marvel/thor/ and /marvel/iron-man/). Is there any benefit in doing a 301 for the "Hulk" page to live at /marvel/hulk/ like it's sibling pages? Is there any harm long-term in leaving the "Hulk" page under a permanently redirected page? Thank you! Matt

                        Intermediate & Advanced SEO | | amag
                        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
                      • viatrading1

                        Several 301 Redirects to Same Page

                        Hi, I have 3 Pages we won't use anymore in our website. Let's call them url A, url B and url C. To keep their SEO strength on our domain, I've though about redirecting all of them to url D. For what I understand, when 301 redirecting, about 85-90% of the link SEO juice is passed. Then, if I redirect 3 URLs to the same page... does url D receive all the link SEO juices for URLs added up? (approximately)
                        e.g. future url D juice = 100% current url D juice + 85% url A juice + 85% url B juice + 85% url C juice Is this the best practice, or is there a better way? Cheers,

                        Intermediate & Advanced SEO | | viatrading1
                        0
                      • Positec

                        How do 302 redirects from Akamai content targeting impact SEO?

                        How do 302 redirects from Akamai content targeting impact SEO? I'm using Akamai content targeting to get people from countries and languages to the right place (eg www.abc.123 to redirect to www.abc.123/NL-nl/default.aspx where folks from the Netherlands get their localized site in dutch) and from the edge server closest to them.  As far as I know Akamai doesn't allow me to use anything but a 302.  Anyone run across this?  is this 302 a problem?  I did a fetch as googlebot on my main domain and all I see is the Akamai 302.  I can't imagine this is the first time Akamai has run across this but I would like to know for sure.

                        Intermediate & Advanced SEO | | Positec
                        0
                      • 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
                      • lhc67

                        Keyword-Rich Domains - Redirect?

                        Hi, Mozzers- I have a client that has a bunch of pretty nice keyword-rich domain names. Their traffic and rankings are good. They provide legal services in the Chicago area. I have lots of good content that I could use to start a blog using a domain like keyword,keyword-blog.com. Good idea? Currently I have a resources area on their website but feel like this area could be getting a little bloated and some news-related stuff isn't really appropriate. 2 Questions: Should I use one of the decent domains for a blog and build up the rankings, traffic, and link to the main site?  Or is this lots of work for little payout? Both sites would be hosted in the cloud. Some of the domain names are related to their name, others are keyword or geo-targeted. Would it be wise to setup 301 redirects going to their website? Pros/cons? If you need additional info, please PM me for details. Thank you, friends! LHC

                        Intermediate & Advanced SEO | | lhc67
                        0
                      • pepsimoz

                        Htaccess Redirect with %C2%A0 in URL

                        Below is my setup for redirects in .htaccess file in my root word press installation. The www to non-www works well, so no problems there Other page redirects work well, too (example: redirect 301 /some-page/ http://mysite.com/another-page/ (I didn't post those because I have a few too many : ) So here it goes... RewriteEngine On
                        RewriteCond %{HTTP_HOST} ^www.mysite.com$ [NC]
                        RewriteRule ^(.*)$ http://mysite.com/$1 [R=301,L] BEGIN WordPress <ifmodule mod_rewrite.c="">RewriteEngine On
                        RewriteBase /
                        RewriteRule ^index.php$ - [L]
                        RewriteCond %{REQUEST_FILENAME} !-f
                        RewriteCond %{REQUEST_FILENAME} !-d
                        RewriteRule . /index.php [L]</ifmodule> END WordPress redirect 301 /archives/10-college- majors/ http://mysite.com/archives/10-college-majors/ redirect 301 /archives/10-college-%20majors/ http://mysite.com/archives/10-college-majors/ redirect 301 /archives/10-college-%C2%A0majors/ http://mysite.com/archives/10-college-majors/ I'm having a problem with the last 301 redirect: redirect 301 /archives/10-college-%C2%A0majors/ http://mysite.com/archives/10-college-majors/ not working... As you can see I've tried using other varations of the "space" but no go. I also used a redirect in cPanel's Redirect screen; testing all the possible options + wildcard I've also tried this: http://serverfault.com/questions/201829/using-special-characters-in-apache-mod-rewrite-rule (perhaps unsuccessfully, because it caused a 500 server error and it's a different situation in my case) I also saw something here: http://www.webmasterworld.com/apache/3908682.htm but I don't know if it works and how I would implement that + do so without compromising ALL other redirects. Note: the URL displays with a space in the address bar of all major web browsers: http://mysite.com/10-college- majors/  and goes to a 404 page I have a goregous page / PR6 / high authority site linking to the URL on my site, but they copied the URL with a space somehow. I contacted the person responsible for the website and he claims it works fine (aka he didn't check it). Is there a clean way to redirect ONLY this problematic URL without compromising other redirects, etc? Any ideas would be great. I'll respond with progress. Thanks in advance. UPDATE the   redirect works, and it did work. Even so, when looking at source of page linking to mine, the URL looks like this: ``` http://mysite.com/archives/10-college- majors/ Clicking the URL in Source View in FireFox takes me to ``` http://mysite.com/archives/10-college-%C2%A0majors/ none of my 301 redirects should direct there. I don't have any redirect plugins either.

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