{"id":560,"date":"2019-10-07T10:16:53","date_gmt":"2019-10-07T15:16:53","guid":{"rendered":"http:\/\/itblog.ldlnet.net\/?p=560"},"modified":"2019-10-07T10:16:53","modified_gmt":"2019-10-07T15:16:53","slug":"outlook-web-app-owa-http-to-https-redirection","status":"publish","type":"post","link":"https:\/\/itblog.ldlnet.net\/index.php\/2019\/10\/07\/outlook-web-app-owa-http-to-https-redirection\/","title":{"rendered":"Outlook Web App (OWA) HTTP to HTTPS Redirection"},"content":{"rendered":"\n<p>For most companies today, we want to make access to OWA easy for the users. Most folks will just type in mail.domain.com\/owa or something of the like to get to the OWA page. If you don&#8217;t use HTTPS by default though, you will not be able to access OWA and will get an error on the page. We need to be able to redirect the HTTP query to go to SSL or HTTPS so that you get the proper logon page and have the access secured by SSL PKI as per the security standard.<br>Now, most bigger companies will install a load balancer that will program the redirection to HTTPS when the request is made before it hits the Exchange Server. But, for small companies, like mine, that cannot afford a load balancer, we need a native way in Windows and Exchange to be able to perform the same task and have it redirect to HTTPS so that your users are not confused when typing in the address.<\/p>\n\n\n\n<p>The following shows how to configure IIS so that it natively redirects all HTTP requests for OWA to HTTPS.<\/p>\n\n\n\n<p>By default in Exchange Server, the URL https:\/\/<em>&lt;ServerName&gt;<\/em> redirects users to https:\/\/<em>&lt;ServerName&gt;<\/em>\/owa. But, if anyone tries to access Outlook on the web (formerly known as Outlook Web App) by using http:\/\/<em>&lt;ServerName&gt;<\/em> or http:\/\/<em>&lt;ServerName&gt;<\/em>\/owa, they&#8217;ll get an error.<\/p>\n\n\n\n<p>You can configure http redirection for Outlook on the web so that requests for http:\/\/<em>&lt;ServerName&gt;<\/em> or http:\/\/<em>&lt;ServerName&gt;<\/em>\/owa are automatically redirected to https:\/\/<em>&lt;ServerName&gt;<\/em>\/owa. This requires the following configuration steps in Internet Information Services (IIS):<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>Remove the <strong>Require SSL<\/strong> setting from the default website. <\/li><li>Restore the <strong>Require SSL<\/strong> setting on other virtual directories in the default website that had it enabled by default <strong><font color=\"red\">(except for \/owa)<\/font><\/strong>. <\/li><li>Configure the default website to redirect http requests to the \/owa virtual directory. <\/li><li>Remove http redirection from all virtual directories in the default website (including \/owa). <\/li><li>Reset IIS for the changes to take effect.<\/li><\/ol>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"step-1-use-iis-manager-to-remove-the-require-ssl-setting-from-the-default-website\">Step 1: Use IIS Manager to remove the Require SSL setting from the default website<\/h3>\n\n\n\n<ol class=\"wp-block-list\"><li>Open IIS Manager on the Exchange server. An easy way to do this in Windows Server 2012 or later is to press Windows key + Q, type inetmgr, and select <strong>Internet Information Services (IIS) Manager<\/strong> in the results. <\/li><li>Expand the server, and expand <strong>Sites<\/strong>. <\/li><li>Select <strong>Default Web Site<\/strong>. and verify <strong>Features View<\/strong> is selected at the bottom of the page. <\/li><li>In the <strong>IIS<\/strong> section, double-click <strong>SSL Settings<\/strong>.<br> <img loading=\"lazy\" decoding=\"async\" width=\"600\" height=\"380\" class=\"wp-image-561\" style=\"width: 600px;\" src=\"http:\/\/itblog.ldlnet.net\/wp-content\/uploads\/2019\/10\/SSL1.png\" alt=\"SSL1\" srcset=\"https:\/\/itblog.ldlnet.net\/wp-content\/uploads\/2019\/10\/SSL1.png 520w, https:\/\/itblog.ldlnet.net\/wp-content\/uploads\/2019\/10\/SSL1-300x190.png 300w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><br><\/li><li>On the <strong>SSL Settings<\/strong> page, clear the <strong>Require SSL<\/strong> check box, and in the <strong>Actions<\/strong> pane, click <strong>Apply<\/strong>.<br> <img loading=\"lazy\" decoding=\"async\" width=\"600\" height=\"217\" class=\"wp-image-562\" style=\"width: 600px;\" src=\"http:\/\/itblog.ldlnet.net\/wp-content\/uploads\/2019\/10\/SSL2.png\" alt=\"SSL2\" srcset=\"https:\/\/itblog.ldlnet.net\/wp-content\/uploads\/2019\/10\/SSL2.png 520w, https:\/\/itblog.ldlnet.net\/wp-content\/uploads\/2019\/10\/SSL2-300x108.png 300w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/li><\/ol>\n\n\n\n<p class=\"has-text-color has-small-font-size has-medium-pink-color\"><strong>Note<\/strong>: To perform this procedure on the command line, open an elevated command prompt on the Exchange server (a Command Prompt window you open by selecting <strong>Run as administrator<\/strong>) and run the following command:<\/p>\n\n\n<pre class=\"lang:PowerShell nums:False\">%windir%\\system32\\inetsrv\\appcmd.exe set config \"Default Web Site\" -section:access -sslFlags:None -commit:APPHOST<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"step-2-use-iis-manager-to-restore-the-require-ssl-setting-on-other-virtual-directories-in-the-default-website\">Step 2: Use IIS Manager to restore the Require SSL setting on other virtual directories in the default website<\/h3>\n\n\n\n<p>When you change the&nbsp;<strong>Require SSL<\/strong>&nbsp;setting on a website in IIS, the setting is automatically inherited by all virtual directories in the website. Because we&#8217;re only interested in configuring Outlook on the web, you need to restore the&nbsp;<strong>Require SSL<\/strong>&nbsp;setting for other virtual directories that had it enabled by default.<\/p>\n\n\n\n<p>Based on the information in the&nbsp;<a href=\"https:\/\/docs.microsoft.com\/en-us\/Exchange\/clients\/outlook-on-the-web\/http-to-https-redirection?view=exchserver-2019#default-require-ssl-and-http-redirect-settings-in-the-default-website-on-an-exchange-server\">Default Require SSL and HTTP Redirect settings in the default website on an Exchange server<\/a>&nbsp;section, use the following procedure to restore the setting on the other virtual directories where&nbsp;<strong>Require SSL<\/strong>&nbsp;was enabled by default:<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>In IIS Manager, expand the server, expand\u00a0<strong>Sites<\/strong>, and expand\u00a0<strong>Default Web Site<\/strong>.<\/li><li>Select the virtual directory, and verify\u00a0<strong>Features View<\/strong>\u00a0is selected at the bottom of the page.<\/li><li>In the\u00a0<strong>IIS<\/strong>\u00a0section, double-click\u00a0<strong>SSL Settings<\/strong>.<br><img loading=\"lazy\" decoding=\"async\" width=\"600\" height=\"358\" class=\"wp-image-563\" style=\"width: 600px;\" src=\"http:\/\/itblog.ldlnet.net\/wp-content\/uploads\/2019\/10\/SSL3.png\" alt=\"SSL3\" srcset=\"https:\/\/itblog.ldlnet.net\/wp-content\/uploads\/2019\/10\/SSL3.png 520w, https:\/\/itblog.ldlnet.net\/wp-content\/uploads\/2019\/10\/SSL3-300x179.png 300w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><br><\/li><li>On the\u00a0<strong>SSL Settings<\/strong>\u00a0page, select the\u00a0<strong>Require SSL<\/strong>\u00a0check box, and in the\u00a0<strong>Actions<\/strong>\u00a0pane, click\u00a0<strong>Apply<\/strong>.<br><img loading=\"lazy\" decoding=\"async\" width=\"600\" height=\"217\" class=\"wp-image-564\" style=\"width: 600px;\" src=\"http:\/\/itblog.ldlnet.net\/wp-content\/uploads\/2019\/10\/SSL4.png\" alt=\"SSL4\" srcset=\"https:\/\/itblog.ldlnet.net\/wp-content\/uploads\/2019\/10\/SSL4.png 520w, https:\/\/itblog.ldlnet.net\/wp-content\/uploads\/2019\/10\/SSL4-300x108.png 300w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><br><\/li><li>Repeat the previous steps on each virtual directory in the default website that had\u00a0<strong>Require SSL<\/strong>\u00a0enabled by default <strong><font color=\"red\">***(except for \/owa)***<\/font><\/strong>. The only virtual directories that don&#8217;t have\u00a0<strong>Require SSL<\/strong>\u00a0enabled by default are \/PowerShell and \/Rpc.<\/li><\/ol>\n\n\n\n<p class=\"has-text-color has-medium-pink-color\"><strong>NOTE: PLEASE REMEMBER TO NOT CHECK THE &#8220;Require SSL&#8221; FOR THE \/OWA DIRECTORY. THIS WILL CAUSE A 403 Access Denied ERROR WHEN TRYING TO REDIRECT.<\/strong><\/p>\n\n\n\n<p class=\"has-text-color has-small-font-size has-medium-pink-color\"><strong>Note<\/strong>: To perform these procedures on the command line, replace&nbsp;<em>&lt;VirtualDirectory&gt;<\/em>&nbsp;with the name of the virtual directory, and run the following command in an elevated command prompt:<\/p>\n\n\n<pre class=\"lang:PowerShell nums:False\">%windir%\\system32\\inetsrv\\appcmd.exe set config \"Default Web Site\/<VirtualDirectory>\" -section:Access -sslFlags:Ssl,Ssl128 -commit:APPHOST<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"step-3-use-iis-manager-to-configure-the-default-website-to-redirect-to-the-owa-virtual-directory\">Step 3: Use IIS Manager to configure the default website to redirect to the \/owa virtual directory.<\/h3>\n\n\n\n<ol class=\"wp-block-list\"><li>In IIS Manager, expand the server, and expand\u00a0<strong>Sites<\/strong>.<\/li><li>Select\u00a0<strong>Default Web Site<\/strong>. and verify\u00a0<strong>Features View<\/strong>\u00a0is selected at the bottom of the page.<\/li><li>In the\u00a0<strong>IIS<\/strong>\u00a0section, double-click\u00a0<strong>HTTP Redirect<\/strong>.<br><img loading=\"lazy\" decoding=\"async\" width=\"600\" height=\"380\" class=\"wp-image-567\" style=\"width: 600px;\" src=\"http:\/\/itblog.ldlnet.net\/wp-content\/uploads\/2019\/10\/SSL5.png\" alt=\"\" srcset=\"https:\/\/itblog.ldlnet.net\/wp-content\/uploads\/2019\/10\/SSL5.png 520w, https:\/\/itblog.ldlnet.net\/wp-content\/uploads\/2019\/10\/SSL5-300x190.png 300w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><br><\/li><li>On the\u00a0<strong>HTTP Redirect<\/strong>\u00a0page, configure the following settings:<\/li><li>Select the\u00a0<strong>Redirect requests to this destination<\/strong>\u00a0check box, and enter the value \/owa.<\/li><li>In the\u00a0<strong>Redirect Behavior<\/strong>\u00a0section, select the\u00a0<strong>Only redirect requests to content in this directory (not subdirectories)<\/strong>\u00a0check box.<\/li><li>In the\u00a0<strong>Status code<\/strong>\u00a0list, verify\u00a0<strong>Found (302)<\/strong>\u00a0is selected.When you&#8217;re finished, click\u00a0<strong>Apply<\/strong>\u00a0in the\u00a0<strong>Actions<\/strong>\u00a0pane.<br><img loading=\"lazy\" decoding=\"async\" width=\"600\" height=\"345\" class=\"wp-image-566\" style=\"width: 600px;\" src=\"http:\/\/itblog.ldlnet.net\/wp-content\/uploads\/2019\/10\/SSL6.png\" alt=\"\" srcset=\"https:\/\/itblog.ldlnet.net\/wp-content\/uploads\/2019\/10\/SSL6.png 520w, https:\/\/itblog.ldlnet.net\/wp-content\/uploads\/2019\/10\/SSL6-300x173.png 300w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/li><\/ol>\n\n\n\n<p class=\"has-text-color has-small-font-size has-medium-pink-color\"><strong>Note<\/strong>: To perform this procedure on the command line, open an elevated command prompt and run the following command:<\/p>\n\n\n<pre class=\"lang:PowerShell nums:False\">%windir%\\system32\\inetsrv\\appcmd.exe set config \"Default Web Site\" -section:httpredirect -enabled:true -destination:\"\/owa\" -childOnly:true<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"step-4-use-iis-manager-to-remove-http-redirection-from-all-virtual-directories-in-the-default-website\">Step 4: Use IIS Manager to remove http redirection from all virtual directories in the default website<\/h3>\n\n\n\n<p>When you enable redirection on a website in IIS, the setting is automatically inherited by all virtual directories in the website. Because we&#8217;re only interested in configuring redirection for the default website, you need to remove the redirect setting from all virtual directories. By default, no directories or virtual directories in the default website are enabled for redirection. For more information, see the&nbsp;<a href=\"https:\/\/docs.microsoft.com\/en-us\/Exchange\/clients\/outlook-on-the-web\/http-to-https-redirection?view=exchserver-2019#default-require-ssl-and-http-redirect-settings-in-the-default-website-on-an-exchange-server\">Default Require SSL and HTTP Redirect settings in the default website on an Exchange server<\/a>&nbsp;section.<\/p>\n\n\n\n<p>Use the following procedure to remove the redirect setting from all virtual directories in the default website (including \/owa):<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>In IIS Manager, expand the server, expand\u00a0<strong>Sites<\/strong>, and expand\u00a0<strong>Default Web Site<\/strong>.<\/li><li>Select the virtual directory, and verify\u00a0<strong>Features View<\/strong>\u00a0is selected at the bottom of the page.<\/li><li>In the\u00a0<strong>IIS<\/strong>\u00a0section, double-click\u00a0<strong>HTTP Redirect<\/strong>.<br><img loading=\"lazy\" decoding=\"async\" width=\"600\" height=\"393\" class=\"wp-image-568\" style=\"width: 600px;\" src=\"http:\/\/itblog.ldlnet.net\/wp-content\/uploads\/2019\/10\/SSL7.png\" alt=\"\" srcset=\"https:\/\/itblog.ldlnet.net\/wp-content\/uploads\/2019\/10\/SSL7.png 520w, https:\/\/itblog.ldlnet.net\/wp-content\/uploads\/2019\/10\/SSL7-300x197.png 300w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><br><\/li><li>On the\u00a0<strong>HTTP Redirect<\/strong>\u00a0page, change the following settings:<\/li><li>Clear the\u00a0<strong>Only redirect requests to content in this directory (not subdirectories)<\/strong>\u00a0check box.<\/li><li>Clear the\u00a0<strong>Redirect requests to this destination<\/strong>\u00a0check box.<\/li><li>In the\u00a0<strong>Actions<\/strong>\u00a0pane, click\u00a0<strong>Apply<\/strong>.<br><img loading=\"lazy\" decoding=\"async\" width=\"600\" height=\"318\" class=\"wp-image-569\" style=\"width: 600px;\" src=\"http:\/\/itblog.ldlnet.net\/wp-content\/uploads\/2019\/10\/SSL8.png\" alt=\"\" srcset=\"https:\/\/itblog.ldlnet.net\/wp-content\/uploads\/2019\/10\/SSL8.png 520w, https:\/\/itblog.ldlnet.net\/wp-content\/uploads\/2019\/10\/SSL8-300x159.png 300w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><br><\/li><li>Repeat the previous steps on each virtual directory in the default website.<\/li><\/ol>\n\n\n\n<p class=\"has-text-color has-small-font-size has-medium-pink-color\"><strong>Note<\/strong>: To perform these procedures on the command line, replace&nbsp;<em>&lt;VirtualDirectory&gt;<\/em>&nbsp;with the name of the virtual directory, and run the following command in an elevated command prompt:<\/p>\n\n\n<pre class=\"lang:PowerShell nums:False\">%windir%\\system32\\inetsrv\\appcmd.exe set config \"Default Web Site\/<VirtualDirectory>\" -section:httpredirect -enabled:false -destination:\"\" -childOnly:false<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"step-5-use-iis-manager-to-restart-iis\">Step 5: Use IIS Manager to restart IIS<\/h3>\n\n\n\n<ol class=\"wp-block-list\"><li>In IIS Manager, select the server.<\/li><li>In the\u00a0<strong>Actions<\/strong>\u00a0pane, click\u00a0<strong>Restart<\/strong>.<br><img loading=\"lazy\" decoding=\"async\" width=\"600\" height=\"403\" class=\"wp-image-570\" style=\"width: 600px;\" src=\"http:\/\/itblog.ldlnet.net\/wp-content\/uploads\/2019\/10\/SSL9.png\" alt=\"\" srcset=\"https:\/\/itblog.ldlnet.net\/wp-content\/uploads\/2019\/10\/SSL9.png 520w, https:\/\/itblog.ldlnet.net\/wp-content\/uploads\/2019\/10\/SSL9-300x201.png 300w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/li><\/ol>\n\n\n\n<p class=\"has-text-color has-small-font-size has-medium-pink-color\"><strong>Note<\/strong>: You can also perform an IISRESET from and Elevated PowerShell Prompt.<\/p>\n\n\n\n<p>My biggest take away from this was NOT setting the SSL Requirement Properly in the \/owa directory when configuring this. <em>By default, the setting is to Require SSL, but to redirect properly, you have to have that Virtual Directory in IIS set to NOT Require SSL.<\/em> Having the 403 error was driving me crazy. I had to get someone else to look at it, but they didn&#8217;t catch it either! That is why I made a point to write this article with the \/owa catch in mind. I hope this helps!<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" style=\"text-align:center\">HAPPY CONFIGURATION!<br>POSITIVE LIFE WILL BRING SUCCESS!<\/h2>\n\n\n\n<p class=\"has-small-font-size\"><strong>REFERENCES:<\/strong><br><em><a rel=\"noreferrer noopener\" aria-label=\"Configure http to https redirection for Outlook on the web in Exchange Server (opens in a new tab)\" href=\"https:\/\/docs.microsoft.com\/en-us\/Exchange\/clients\/outlook-on-the-web\/http-to-https-redirection?view=exchserver-2019\" target=\"_blank\">Configure http to https redirection for Outlook on the web in Exchange Server<\/a><\/em><br><em><a href=\"https:\/\/docs.microsoft.com\/en-us\/Exchange\/clients\/outlook-on-the-web\/http-to-https-redirection?view=exchserver-2019#default-require-ssl-and-http-redirect-settings-in-the-default-website-on-an-exchange-server\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\"Default Require SSL and HTTP Redirect settings in the default website on an Exchange server (opens in a new tab)\">Default Require SSL and HTTP Redirect settings in the default website on an Exchange server<\/a><\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>For most companies today, we want to make access to OWA easy for the users. Most folks will just type in mail.domain.com\/owa<\/p>\n<p class=\"link-more\"><a class=\"myButt \" href=\"https:\/\/itblog.ldlnet.net\/index.php\/2019\/10\/07\/outlook-web-app-owa-http-to-https-redirection\/\">Read More<\/a><\/p>\n","protected":false},"author":1,"featured_media":161,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,2,16],"tags":[9,149,151,173,174,170,167,217,127],"class_list":["post-560","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-exchange","category-general","category-windows","tag-exchange","tag-exchange-2016","tag-exchange-2019","tag-http","tag-https","tag-iis","tag-owa","tag-redirect","tag-ssl","odd"],"_links":{"self":[{"href":"https:\/\/itblog.ldlnet.net\/index.php\/wp-json\/wp\/v2\/posts\/560","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/itblog.ldlnet.net\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/itblog.ldlnet.net\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/itblog.ldlnet.net\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/itblog.ldlnet.net\/index.php\/wp-json\/wp\/v2\/comments?post=560"}],"version-history":[{"count":2,"href":"https:\/\/itblog.ldlnet.net\/index.php\/wp-json\/wp\/v2\/posts\/560\/revisions"}],"predecessor-version":[{"id":571,"href":"https:\/\/itblog.ldlnet.net\/index.php\/wp-json\/wp\/v2\/posts\/560\/revisions\/571"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/itblog.ldlnet.net\/index.php\/wp-json\/wp\/v2\/media\/161"}],"wp:attachment":[{"href":"https:\/\/itblog.ldlnet.net\/index.php\/wp-json\/wp\/v2\/media?parent=560"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/itblog.ldlnet.net\/index.php\/wp-json\/wp\/v2\/categories?post=560"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/itblog.ldlnet.net\/index.php\/wp-json\/wp\/v2\/tags?post=560"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}