17 Mar 2015

IIS 7 URL Rewrite - Ensure SSL/HTTPS and Ensure Fully Qualified Domain Name (FQDN) as Hostname

I had the goal of ensuring all traffic on a web site was via SSL, and also using the canonical hostname, i.e. www.mysite.com rather than just mysite.com.

After installing URL Rewrite 2.0 on IIS, this was achieved by adding the following to the site's root web.config file.


    
        
            
                
                    
                    
                        
                    
                    
                
                
                    
                    
                        
                    
                    
                
            
           
    
If I helped you out today, you can buy me a beer below. Cheers!