how to redirect a secure site to www

dowhatyoudo22
dowhatyoudo22 used Ask the Experts™
on
I have an SSL key for 'www.site.com' When users go to 'www.site.com' everything works just fine. When users go to 'site.com' they are presented with a certificate error message. My site is running on Windows Server 2008 R2 (IIS 7.5) how can I configure IIS so that all attempts to 'site.com' are redirected to 'www.site.com' ?

I have tried to use the HTTP Redirect function but when I enter 'https://www.site.com' into the destination field and test I get an error that the page cannot be loaded.

I have tried to use the URL Rewrite function but nothing appears to happen.

Any suggestions?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Top Expert 2015

Commented:
Can you have a look at this site and let me know if this is the way you did it?  I didn't run into problem redirecting non WWW to the WWW website.

HTTP Redirection in IIS 7 on Windows Server 2008: http://blog.pluralsight.com/iis7-redirect-windows-server-2008
Dave BaldwinFixer of Problems
Most Valuable Expert 2014

Commented:
You can't use a redirect for that because the connection is being rejected before you can redirect it.  However, most Certs are issued for both the 'www.site.com' and 'site.com' names.  You should talk to the cert supplier about that.

Author

Commented:
URL Rewrite was the solution

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial