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 ?