G'Day,
We're looking to use SNI to host SSL websites on a cloud based single IP solution. Can .net figure out if a client is SNI capable before the TLS handshake and over HTTP?
It's not clear what you mean by "before the TLS handshake".
The Server Name extension is in the Client Hello message, which is the very first TLS message sent by the client to initiate the handshake. Since HTTPS also always starts with establishing the TLS connection first, there's nothing happening before at all. Knowing whether the client is SNI capable before the handshake the way is simply impossible.
You might be able to sort something out on the client side, using JavaScript to try to detect SNI support.
This being said, it's unlikely to solve your general problem: if you have a fallback/wildcard certificate when SNI isn't supported, there's little point in having other specific certificates (besides the fact widlcard certificates are not recommended); if you expect SNI, you'll block out clients that don't support it.
If you look at wikipedia it lists the following as SNI compatible.
So if you start the connection in HTTP
then you can check the useragent
and detect if the client supports SNI
and if they do redirect them to HTTPS
if not keep them on HTTP
.
In our case the only web browser that we care about that ain't SNI compatible is IE on XP...