Webmasters Stack Exchange is a question and answer site for pro webmasters. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a web site who's home page is at


when a new user first hits the web site I'm creating a unique id of 5 chars for them (for example 'abcde' and redirecting them to http://domain.com/abcde so they can later bookmark and return to their workspace.

My question is what's the best approach for SEO purposes, I need the main url domain.com to be indexed but Google will also get the redirect and will not index the main page.

I know about canonical urls, but this applies only when the domain.com url does not redirect

also should I use 301 or 302 code in the redirect ?

share|improve this question
Does the user dashboard contain content that should be indexed? – toomanyairmiles Mar 26 '12 at 11:08
no, the content is injected with java-script and moreover I prefer it's never indexed, only the static content. – kokoko Mar 26 '12 at 11:09
should I use hash like domain.com/#abcde ? – kokoko Mar 26 '12 at 11:30
up vote 3 down vote accepted

That kind of borders on cloaking and could get you dinged or even banned from Google. What you might think about doing is for first time users having your home page with all of the information and a big "Get Started" button and if they return use a cookie to identify they user and redirect them to http://domain.com/abcde.

share|improve this answer
It's only cloaking if you're serving up different content to the search engines for the sake of manipulating their search results. Personalized content is expected to not be available to search engines. – John Conde Mar 26 '12 at 18:46
Just from what he was asking for "when a new user first hits the web site I'm creating a unique id of 5 chars for them (for example 'abcde' and redirecting them to domain.com/abcde"; This looks like he want everyone to hit the costume urls and google to hit domain.com. Automatically redirecting them once they hit the domain so that they never see the content is cloaking. – Lee Mar 26 '12 at 18:49
It's the same content, just "their workspace" which is customized for them. Search engines don't get the customized stuff because they don't use it. I doubt they would have issues with this. – John Conde Mar 26 '12 at 18:54
thanks, I think your answer makes sense. I just wanted to save the click and offer a better UX – kokoko Mar 26 '12 at 19:38

If you do not want the URLs with the unique IDS indexed then after capturing that information and setting cookies/setting up their session do a 301 redirect to the index page without the query string. Canonical URLs would work, too, but this way clearly ensures only the non-querystring version is only ever indexed.

share|improve this answer
but I want the user to stay at the unique ID page ... so if for example they send the link or bookmark they get their unique page if I do 301 redirect they will be redirected to the main home page – kokoko Mar 26 '12 at 11:37
If you redirect them they'll still be at the same page. But if that value in the query string is important then you either need to store it in a cookie or session so you can reference it in your code. If you can't do that then you need to use canonical URLs to indicate all of those URLs are the same as the home page to count them as such. – John Conde Mar 26 '12 at 15:59
@JohnConde - his point is, once the user is on his/her site (www.site.com/12345) he wants them to be able to save that link directly. If he does a 301 redirect to www.site.com without the 12345, they will be going to the primary landing page without any of the unique information present before. This may be very important in the sense of a selling website for each sub-customer/client. – JM4 Nov 7 '12 at 16:40
I got crucified for posting this on SO but looking at a site like moolala.com you will see what I and he are saying. The site generates unique "subdomain's" which are relevant to a person getting credit for a sale. – JM4 Nov 7 '12 at 16:42

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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