I've entered SSL url in configuration as "https://www.my-website.com" and created one site domain with "test.my-website.com" set as Name field (no other fields filled).
Then I've visited https://www.my-website.com and I wasn't redirected back to http://www.my-website.com because site domain was matched by mistake resulted redirect code to think, that website has no SSL url specified.