3

I have a SaaS product which is hosted under several different domains. However, there is one company that manages all these domains. They asked for a system to be able to login at domain1.com and automatically be logged in at domain2.com etc. We implemented this feature using a central CAS server. However the solution requires a redirect (once only) to the CAS server domain to check if the user is logged in. Here is an example of the trace:

  1. www.example.com text/html 301 - permanent redirect (without www)
  2. example.com text/html 302 - temporary redirect (to check if user logged in via CAS server domain)
  3. login.cas-server.com/login text/html 303 - redirect again since action is complete here
  4. example.com text/html 200
  5. ...rest of page resources loads all OK text/html 200

The problem we have noticed is that it appears traffic to the site has started to drop since we implemented this.

My question is does the above practice hurt SEO and if so is there a way to tell search engine bots that we need to perform this redirect first (and to ignore it)? Is another redirect code better to use (perhaps 307)?

2
  • i have to ask - why would you perform a redirect on all traffic in this situation? Is there a necessity to have an anon user classified as a "guest" through this system before the remainder of the page is accessible? I apologize if I am misunderstanding the intention May 2, 2013 at 0:09
  • We need to check on first request to the domain (i.e. before a server session is created) if the user coming to the site is already logged in at one of our partner sites. So user signs in (at domain1.com) then visits domain2.com that will redirect to our CAS server which identifies that the user has already logged into domain1.com and then sets the session correctly. This only needs to happen on the first request since after that the session is set correctly for that domain (but we have to check for every new session, of course). May 6, 2013 at 6:53

2 Answers 2

2

I strongly recommend not to use these redirects just check the user is login or not. Let me explain what a 301 redirect will do:

When you use 301 redirect from page 1 to page 2, search engines will pass the value of all all page authority, rankings, and backlinks from page 1 to page 2. In this situation, page 1 will lose its rankings and page 2 will start gaining ranks as it was for page 1.

I am sure you can find some alternate solution of this redirection.

2
  • We using a 302 redirect for checking login status with the CAS server followed by a 303 redirect back to the main site. We have to use a redirect since it is a central server that is holding cross domain login sessions. Just wondered if this set of redirects (302 -> 303) will hurt SEO at all. May 6, 2013 at 6:47
  • Yes it will hurt as search engine crawler will consider 302 redirection as a temporary redirection. Any type of redirection loop is not recommended for website until and unless the pages are permanently move or temporary moved.
    – PeggyP
    May 8, 2013 at 5:16
0

A 301 Moved Permanently is used to mark a page as having moved permanently. It should not be used to pass data back and forth between servers or services.

1
  • We using a 302 redirect for checking login status with the CAS server followed by a 303 redirect back to the main site. May 6, 2013 at 6:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.