<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>IIS | KC's Blog</title>
	<atom:link href="https://www.kjctech.net/tag/iis/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.kjctech.net</link>
	<description></description>
	<lastBuildDate>Thu, 25 Apr 2024 05:51:32 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	

<image>
	<url>https://i0.wp.com/www.kjctech.net/wp-content/uploads/2016/12/cropped-KC-Logo.png?fit=32%2C32&#038;ssl=1</url>
	<title>IIS | KC's Blog</title>
	<link>https://www.kjctech.net</link>
	<width>32</width>
	<height>32</height>
</image> 
<site xmlns="com-wordpress:feed-additions:1">24634607</site>	<item>
		<title>Enforcing HTTP to HTTPS on IIS</title>
		<link>https://www.kjctech.net/forcing-https-on-iis/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=forcing-https-on-iis</link>
					<comments>https://www.kjctech.net/forcing-https-on-iis/#respond</comments>
		
		<dc:creator><![CDATA[Kent Chen]]></dc:creator>
		<pubDate>Thu, 25 Apr 2024 05:49:23 +0000</pubDate>
				<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[IIS]]></category>
		<guid isPermaLink="false">https://www.kjctech.net/?p=5170</guid>

					<description><![CDATA[<p>The IIS server on Windows doesn&#8217;t have a feature that can automatically redirect traffic out of the box. There are multiple ways to accomplish it but the easiest way is probably to use a module called URL Rewrite. Go to the URL Rewrite Module site to download the installation file and run it on a server you want to enforce [&#8230;]</p>
The post <a href="https://www.kjctech.net/forcing-https-on-iis/">Enforcing HTTP to HTTPS on IIS</a> first appeared on <a href="https://www.kjctech.net">KC's Blog</a>.]]></description>
										<content:encoded><![CDATA[<p>The IIS server on Windows doesn&#8217;t have a feature that can automatically redirect traffic out of the box. There are multiple ways to accomplish it but the easiest way is probably to use a module called <a href="https://learn.microsoft.com/en-us/iis/extensions/url-rewrite-module/using-the-url-rewrite-module" target="_blank" rel="noopener" title="">URL Rewrite</a>.</p>



<p>Go to the <a href="https://www.iis.net/downloads/microsoft/url-rewrite" target="_blank" rel="noopener" title="">URL Rewrite Module site</a> to download the installation file and run it on a server you want to enforce the HTTPS traffic.</p>



<p>Once installed, go to the SSL-enabled site on IIS Manager, select <em>URL Rewrite</em>, <em>Add Rules</em>, and a <em>Blank rule</em>. </p>



<figure class="wp-block-image size-large"><img data-recalc-dims="1" fetchpriority="high" decoding="async" width="600" height="271" src="https://i0.wp.com/www.kjctech.net/wp-content/uploads/2024/04/image-8.png?resize=600%2C271&#038;ssl=1" alt="" class="wp-image-5171" srcset="https://i0.wp.com/www.kjctech.net/wp-content/uploads/2024/04/image-8.png?resize=600%2C271&amp;ssl=1 600w, https://i0.wp.com/www.kjctech.net/wp-content/uploads/2024/04/image-8.png?resize=450%2C203&amp;ssl=1 450w, https://i0.wp.com/www.kjctech.net/wp-content/uploads/2024/04/image-8.png?resize=250%2C113&amp;ssl=1 250w, https://i0.wp.com/www.kjctech.net/wp-content/uploads/2024/04/image-8.png?resize=520%2C235&amp;ssl=1 520w, https://i0.wp.com/www.kjctech.net/wp-content/uploads/2024/04/image-8.png?resize=360%2C163&amp;ssl=1 360w, https://i0.wp.com/www.kjctech.net/wp-content/uploads/2024/04/image-8.png?resize=100%2C45&amp;ssl=1 100w, https://i0.wp.com/www.kjctech.net/wp-content/uploads/2024/04/image-8.png?w=651&amp;ssl=1 651w" sizes="(max-width: 600px) 100vw, 600px" /></figure>



<p>Name your rule and set up the details as below:</p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p><strong>Match URL</strong><br><em>Requested URL:</em>&nbsp;<code>Matches the Pattern</code><br><em>Using:</em>&nbsp;<code>Wildcards</code><br><em>Pattern:</em>&nbsp;<code>*</code><br><em>Ignore case:</em>&nbsp;Checked</p>



<p><strong>Conditions</strong><br><em>Logical grouping:</em>&nbsp;<code>Match Any</code><br><em>Condition input</em>:&nbsp;<code>{HTTPS}</code><br><em>Check if input string:</em>&nbsp;<code>Matches the Pattern</code><br><em>Pattern:</em>&nbsp;<code>OFF</code><br><em>Ignore case:</em>&nbsp;Checked<br><em>Track capture groups across conditions:</em>&nbsp;Not checked</p>



<p><strong>Server Variables</strong><br>Leave blank.</p>



<p><strong>Action</strong><br><em>Action type:</em>&nbsp;<code>Redirect</code><br><em>Redirect URL:</em>&nbsp;<code>https://{HTTP_HOST}{REQUEST_URI}</code><br><em>Append query string:</em>&nbsp;Not checked<br><em>Redirect type:</em>&nbsp;<code>Permanent (301)</code></p>
</blockquote>



<p>Restart the IIS server and you are all set.</p>The post <a href="https://www.kjctech.net/forcing-https-on-iis/">Enforcing HTTP to HTTPS on IIS</a> first appeared on <a href="https://www.kjctech.net">KC's Blog</a>.]]></content:encoded>
					
					<wfw:commentRss>https://www.kjctech.net/forcing-https-on-iis/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">5170</post-id>	</item>
		<item>
		<title>Self-Signing Certificate to Enable HTTPS on IIS</title>
		<link>https://www.kjctech.net/self-signing-certificate-to-enable-https-on-iis/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=self-signing-certificate-to-enable-https-on-iis</link>
					<comments>https://www.kjctech.net/self-signing-certificate-to-enable-https-on-iis/#respond</comments>
		
		<dc:creator><![CDATA[Kent Chen]]></dc:creator>
		<pubDate>Tue, 23 Apr 2024 23:04:49 +0000</pubDate>
				<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Certificate Authority]]></category>
		<category><![CDATA[IIS]]></category>
		<guid isPermaLink="false">https://www.kjctech.net/?p=5163</guid>

					<description><![CDATA[<p>For internal-use IIS-based sites, you can enable HTTPS by self-signing a certificate and distributing it through the Group Policy so you can avoid seeing warning messages like this. Self-Signing a Certificate Simply open an elevated PowerShell window and run the following command to self-sign a 5-year certificate to the certificate store on the local machine. New-SelfSignedCertificate -DnsName "servername" -CertStoreLocation cert:\LocalMachine\My [&#8230;]</p>
The post <a href="https://www.kjctech.net/self-signing-certificate-to-enable-https-on-iis/">Self-Signing Certificate to Enable HTTPS on IIS</a> first appeared on <a href="https://www.kjctech.net">KC's Blog</a>.]]></description>
										<content:encoded><![CDATA[<p>For internal-use IIS-based sites, you can enable HTTPS by self-signing a certificate and distributing it through the Group Policy so you can avoid seeing warning messages like this.</p>



<figure class="wp-block-image size-large"><a href="https://i0.wp.com/www.kjctech.net/wp-content/uploads/2024/04/image-3.png?ssl=1" data-rel="lightbox-image-0" data-rl_title="" data-rl_caption="" title=""><img data-recalc-dims="1" decoding="async" width="600" height="401" src="https://i0.wp.com/www.kjctech.net/wp-content/uploads/2024/04/image-3.png?resize=600%2C401&#038;ssl=1" alt="" class="wp-image-5164" srcset="https://i0.wp.com/www.kjctech.net/wp-content/uploads/2024/04/image-3.png?resize=600%2C401&amp;ssl=1 600w, https://i0.wp.com/www.kjctech.net/wp-content/uploads/2024/04/image-3.png?resize=450%2C300&amp;ssl=1 450w, https://i0.wp.com/www.kjctech.net/wp-content/uploads/2024/04/image-3.png?resize=250%2C167&amp;ssl=1 250w, https://i0.wp.com/www.kjctech.net/wp-content/uploads/2024/04/image-3.png?resize=520%2C347&amp;ssl=1 520w, https://i0.wp.com/www.kjctech.net/wp-content/uploads/2024/04/image-3.png?resize=360%2C240&amp;ssl=1 360w, https://i0.wp.com/www.kjctech.net/wp-content/uploads/2024/04/image-3.png?resize=100%2C67&amp;ssl=1 100w, https://i0.wp.com/www.kjctech.net/wp-content/uploads/2024/04/image-3.png?w=647&amp;ssl=1 647w" sizes="(max-width: 600px) 100vw, 600px" /></a></figure>



<h3 class="wp-block-heading">Self-Signing a Certificate</h3>



<p>Simply open an elevated PowerShell window and run the following command to self-sign a 5-year certificate to the certificate store on the local machine.</p>



<pre class="wp-block-preformatted">New-SelfSignedCertificate -DnsName "servername" -CertStoreLocation cert:\LocalMachine\My -FriendlyName "servername" -NotAfter (Get-Date).AddYears(5)</pre>



<p>Technically, you can do so on any given computer but it&#8217;s easier to run it right on the IIS server so you don&#8217;t have to move the certificate around.</p>



<h3 class="wp-block-heading">Binding the certificate to IIS</h3>



<p>Right-click the site on IIS and choose Edit Binding. Add the HTTPS (443) binding and pick the certificate you just self-signed from the list.</p>



<figure class="wp-block-image size-large"><a href="https://i0.wp.com/www.kjctech.net/wp-content/uploads/2024/04/image-4.png?ssl=1" data-rel="lightbox-image-1" data-rl_title="" data-rl_caption="" title=""><img data-recalc-dims="1" decoding="async" width="600" height="398" src="https://i0.wp.com/www.kjctech.net/wp-content/uploads/2024/04/image-4.png?resize=600%2C398&#038;ssl=1" alt="" class="wp-image-5165" srcset="https://i0.wp.com/www.kjctech.net/wp-content/uploads/2024/04/image-4.png?resize=600%2C398&amp;ssl=1 600w, https://i0.wp.com/www.kjctech.net/wp-content/uploads/2024/04/image-4.png?resize=450%2C298&amp;ssl=1 450w, https://i0.wp.com/www.kjctech.net/wp-content/uploads/2024/04/image-4.png?resize=250%2C166&amp;ssl=1 250w, https://i0.wp.com/www.kjctech.net/wp-content/uploads/2024/04/image-4.png?resize=768%2C509&amp;ssl=1 768w, https://i0.wp.com/www.kjctech.net/wp-content/uploads/2024/04/image-4.png?resize=700%2C464&amp;ssl=1 700w, https://i0.wp.com/www.kjctech.net/wp-content/uploads/2024/04/image-4.png?resize=520%2C345&amp;ssl=1 520w, https://i0.wp.com/www.kjctech.net/wp-content/uploads/2024/04/image-4.png?resize=360%2C239&amp;ssl=1 360w, https://i0.wp.com/www.kjctech.net/wp-content/uploads/2024/04/image-4.png?resize=100%2C66&amp;ssl=1 100w, https://i0.wp.com/www.kjctech.net/wp-content/uploads/2024/04/image-4.png?w=793&amp;ssl=1 793w" sizes="(max-width: 600px) 100vw, 600px" /></a></figure>



<h3 class="wp-block-heading">Exporting the certificate</h3>



<p>Open the Certificate detail from Server Certificates on the IIS Manager, go to the Details tab, and choose Copy to File&#8230; button.</p>



<figure class="wp-block-image size-full"><a href="https://i0.wp.com/www.kjctech.net/wp-content/uploads/2024/04/image-5.png?ssl=1" data-rel="lightbox-image-2" data-rl_title="" data-rl_caption="" title=""><img data-recalc-dims="1" loading="lazy" decoding="async" width="575" height="559" src="https://i0.wp.com/www.kjctech.net/wp-content/uploads/2024/04/image-5.png?resize=575%2C559&#038;ssl=1" alt="" class="wp-image-5166" srcset="https://i0.wp.com/www.kjctech.net/wp-content/uploads/2024/04/image-5.png?w=575&amp;ssl=1 575w, https://i0.wp.com/www.kjctech.net/wp-content/uploads/2024/04/image-5.png?resize=450%2C437&amp;ssl=1 450w, https://i0.wp.com/www.kjctech.net/wp-content/uploads/2024/04/image-5.png?resize=250%2C243&amp;ssl=1 250w, https://i0.wp.com/www.kjctech.net/wp-content/uploads/2024/04/image-5.png?resize=520%2C506&amp;ssl=1 520w, https://i0.wp.com/www.kjctech.net/wp-content/uploads/2024/04/image-5.png?resize=360%2C350&amp;ssl=1 360w, https://i0.wp.com/www.kjctech.net/wp-content/uploads/2024/04/image-5.png?resize=100%2C97&amp;ssl=1 100w" sizes="auto, (max-width: 575px) 100vw, 575px" /></a></figure>



<p>Follow the wizard, choose <strong><em>Yes, export the private key</em></strong>, and <strong><em>Include all certificates in the certification path</em></strong> option to save it with a password.</p>



<h3 class="wp-block-heading">Distributing the certificate via the Group Policy</h3>



<p>Open the Group Policy Management console, and head over to the following location.</p>



<pre class="wp-block-preformatted">Computer Configuration\Policies\Windows Settings\Security Settings\Public Key Policies</pre>



<p>Right-click the <strong><em>Trusted Root Certification Authorities </em></strong>and choose <strong><em>Import</em></strong>.</p>



<figure class="wp-block-image size-full"><img data-recalc-dims="1" loading="lazy" decoding="async" width="461" height="214" src="https://i0.wp.com/www.kjctech.net/wp-content/uploads/2024/04/image-7.png?resize=461%2C214&#038;ssl=1" alt="" class="wp-image-5168" srcset="https://i0.wp.com/www.kjctech.net/wp-content/uploads/2024/04/image-7.png?w=461&amp;ssl=1 461w, https://i0.wp.com/www.kjctech.net/wp-content/uploads/2024/04/image-7.png?resize=450%2C209&amp;ssl=1 450w, https://i0.wp.com/www.kjctech.net/wp-content/uploads/2024/04/image-7.png?resize=250%2C116&amp;ssl=1 250w, https://i0.wp.com/www.kjctech.net/wp-content/uploads/2024/04/image-7.png?resize=360%2C167&amp;ssl=1 360w, https://i0.wp.com/www.kjctech.net/wp-content/uploads/2024/04/image-7.png?resize=100%2C46&amp;ssl=1 100w" sizes="auto, (max-width: 461px) 100vw, 461px" /></figure>



<p>Then on the <strong><em>File to Import </em></strong>window, pick the PFX file you exported from the last step. Make sure you pick the *.pfx type from the dropdown list.</p>



<h3 class="wp-block-heading">Forcing HTTPS</h3>



<p>Once the certificate gets distributed to the workstations, <a href="https://www.kjctech.net/forcing-https-on-iis/" target="_blank" rel="noopener" title="Forcing HTTPS on IIS">redirect all HTTP traffic to HTTPS</a> to enforce secure access.</p>The post <a href="https://www.kjctech.net/self-signing-certificate-to-enable-https-on-iis/">Self-Signing Certificate to Enable HTTPS on IIS</a> first appeared on <a href="https://www.kjctech.net">KC's Blog</a>.]]></content:encoded>
					
					<wfw:commentRss>https://www.kjctech.net/self-signing-certificate-to-enable-https-on-iis/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">5163</post-id>	</item>
	</channel>
</rss>
