How can I use HTTPS with *.domain.com AND domain.com?

view story

http://serverfault.com – I've been looking for a solution to the following problem for a few days now. I have domain.com for which I have bought and installed a wildcard certificate so now I can provide secure access to www.domain.com or whatever.domain.com. This works. However, even though the application thar runs on these subdomains makes sure no one gets to visit an URL that doesn't contain at least www as the subdomain, you can still delete the www part. Once you do that no serverside redirects will help if you are on https because the browser will not fulfil the request because the wildcard ssl certificate will (HowTos)