Log in to subdomain via main domain

Posted by Mattias on Stack Overflow See other posts from Stack Overflow or by Mattias
Published on 2012-11-14T22:52:23Z Indexed on 2012/11/14 23:00 UTC
Read the original article Hit count: 204

Filed under:
|

I have a website, available through multiple domainnames. like

www.domain1.com
....
www.domain5.com

All my customers have their own subdomain. like:

customer1.domain1.com
customer2.domain1.com
....
customer351.domain4.com

Currently i dont use SSL, each customer log in their own account via their sub domain. I want to change this, and make all customers log in on a central log in page, that would use SSL, for example.

https://login.domain1.com

And somehow redirect each user to the correct sub domain adress. (Sub domain that don't use SSL) How do I do this, and maintain security?

One idea i had:

Login -> add random value somewhere in the database, Redirect to subdomain, with querystring the randomvalue. And after that the session takes care of it, Each value can be used once only.. But how secure is that?

I guess someone would ask the question "why?" to me. Because SSL costs money. And unfortunately i dont have a lot of it. :D

Thanks for your time!

© Stack Overflow or respective owner

Related posts about ASP.NET

Related posts about ssl