Login redirect 302
-
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.
-
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
-
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!
-
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
-
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.
-
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
-
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
-
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?
-
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
Got a burning SEO question?
Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.
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.
Related Questions
-
301 Redirect and Loss of PA and DA
Mozzers, http:itsgr82bme.com Old domain homepage had a DA of 24 and a PA of 36 Currently redirected to http://thekidstime.com Homepage shows a DA of 6 and a PA of 1. That is a significant loss of authority. I thought a 301 is supposed to be better than that. What gives? What are the next steps, asking the old backlinks to update their links? Thanks for your help, Matt
Intermediate & Advanced SEO | | matt.nails0 -
Too many redirects Homepage Problem
During a site move, a sub domain of website a redirected all pages to the homepage of website b. resulting a homepage algorithmic penalty for website b. The sub domain was deleted - and the sitemove for the main domain went through ok. However website b has 80,000 incoming links from the sub domain of website a. is there anything else that needs to be done to "inform" google that the mistake was fixed?
Intermediate & Advanced SEO | | FusionMediaLimited1 -
Hundreds of 301 Redirects. Remove Pages or Not?
Hi Mozers, I have a website that has literally got hundreds of 301 redirects. I had a close look at these URLs and only some of them have backlinks to it and remaining all of them are not indexing in Google and has got not backlinks at all. Based on what I have noticed experts mentioning, loads of 301 redirects can potentially slow down the site speed. In a case like the website I have, should I completely take off the pages from website to reduce the number of 301 redirects or should I leave 301 redirects? There is no traffic or backlinks coming from these URLs. Malika
Intermediate & Advanced SEO | | Malika10 -
Redirecting from _ to - ?
hi everyone, I need your help! 🙂 What's the best way to redirect a lot of urls from sign _ to sign - ? We changed our e-shop CMS and we don't use that _ anymore. We have more than 100.000 URLs and you can imagine that we don't to do by hand. Any chance of doing it with .htaccess easily? Thanks!
Intermediate & Advanced SEO | | FCRMediaLietuva0 -
Url rewrite & 301 redirects
Hi all I am having some issues rearding url rewrites and 301 redirects with 1 and 1 hosting and am unsure of the best approach. The website is a custom made shopping cart system with categories and products. The current urls for categories are : index.php?l=product_list&c=1 The new url format required is : /banner-stands The current urls for products are : index.php?l=product_detail&c=1&p=1 The new url format required is : /banner-stands/banner-stand Thanks
Intermediate & Advanced SEO | | vividwebdesign0 -
Is it safe to redirect multiple URLs to a single URL?
Hi, I have an old Wordress website with about 300-400 original pages of content on it. All relating to my company's industry: travel in Africa. It's a legitimate site with travel stories, photos, advice etc. Nothing spammy about. No adverts on it. No affiliates. The site hasn't been updated for a couple of years and we no longer have a need for it. Many of the stories on it are quite out of date. The site has built up a modest Mozrank value over the last 5 years, and has a few hundreds organically achieved inbound links. Recently I set up a swanky new branded website on ExpressionEngine on a new domain. My intention is to: Shut down the old site Focus all attention on building up content on the new website Ask the people linking to the old site to my new site instead (I wonder how many will actually do so...) Where possible, setup a 301 redirect from pages on the old site to their closest match on the new site Setup a 301 redirect from the old site's home page to new site's homepage Sounds good, right? But there is one issue I need some advice on... The old site has about 100 pages that do not have a good match on the new site. These pages are outdated or inferior quality, so it doesn't really make sense to rewrite them and put them on the new site. I call these my "black sheep pages". So... for these "black sheep pages" should I (A) redirect the urls to the new site's homepage (B) redirect the urls the old site's home page (which in turn, redirects to the new site's homepage, or (C) not redirect the urls, and let them die a lonely 404 death? OPTION A: oldsite.com/page1.php -> newsite.com
Intermediate & Advanced SEO | | AndreVanKets
oldsite.com/page2.php -> newsite.com
oldsite.com/page3.php -> newsite.com
oldsite.com/page4.php -> newsite.com
oldsite.com/page5.php -> newsite.com
oldsite.com -> newsite.com OPTION B: oldsite.com/page1.php -> oldsite.com
oldsite.com/page2.php -> oldsite.com
oldsite.com/page3.php -> oldsite.com
oldsite.com/page4.php -> oldsite.com
oldsite.com/page5.php -> oldsite.com
oldsite.com -> newsite.com OPTION 😄 oldsite.com/page1.php : do not redirect, let page 404 and disappear forever
oldsite.com/page2.php : do not redirect, let page 404 and disappear forever
oldsite.com/page3.php : do not redirect, let page 404 and disappear forever
oldsite.com/page4.php : do not redirect, let page 404 and disappear forever
oldsite.com/page5.php : do not redirect, let page 404 and disappear forever
oldsite.com -> newsite.com My intuition tells me that Option A would pass the most "link juice" to my new site, but I am concerned that it could also be seen by Google as a spammy redirect technique. What would you do? Help 😐1 -
Cookies and redirects - what are the negative effects?
I am advising a client who wants to streamline their online customers experience through the use of cookies. The first time someone visits mysite.com, they will visit the normal index page, and on that page will be asked to identify themselves as a Personal or Business customer - and taken through to a relevant page. This will result in a cookie being added. The next time they come back to mysite.com, the cookie will automatically direct them from the index page to mysite.com/personal/ or mysite.com/business/. My question is, what are the SEO implications of this, especially given the fact the index page is their primary landing page for almost all organic traffic? Bots I realise that googlebot etc do not store cookies, so this should result in no change from the bots perspective (i.e. no redirect) but is it that simple? In effect we'll be showing the bot one thing and second time + visitors something else. Is this not effectively cloaking? All advice gratefully received!
Intermediate & Advanced SEO | | seomasters0 -
Merging several domains into one, a redirection question
Hi, We have a client who recently acquired a bunch of domains in all kinds of niches, each domain has a WordPress site on it, with content and backlinks. Clients wants to "merge" all these domains into categories in his "main website", moving content and "moving" backlinks as well. The syntax we came up with is the following: (sample domains of course)
Intermediate & Advanced SEO | | MandLoys
potatomixers.com will be updated with .htaccess 301 redirect:
Redirect 301 /fastpotatomixer.htm http://www.mainwebsite.com/home-appliances/fastpotatomixer 1.) I'm not sure about the domain's root though. Where would I redirect potatomixers.com, to mainwebsite.com/home-appliances? Won't that be a problem that the new one is a "larger" category that has other posts as well, not only potatomixers? 2.) If this gets into the .htaccess (with several other lines for the other content as well of course), won't the first line "override" all the other ones? Redirect 301 / http://www.mainwebsite.com/home-appliances/
Redirect 301 /fastpotatomixer.htm http://www.mainwebsite.com/home-appliances/fastpotatomixer
Redirect 301 /easypotatomixer.htm http://www.mainwebsite.com/home-appliances/easypotatomixer etc. Thanks!0