{"id":11376,"date":"2020-03-17T04:27:54","date_gmt":"2020-03-17T04:27:54","guid":{"rendered":"https:\/\/www.gmass.co\/blog\/?p=11376"},"modified":"2020-03-30T03:12:41","modified_gmt":"2020-03-30T03:12:41","slug":"iis-site-to-redirect-to-www-and-https","status":"publish","type":"post","link":"https:\/\/www.gmass.co\/blog\/iis-site-to-redirect-to-www-and-https\/","title":{"rendered":"A better way to get an IIS site to redirect to www and https"},"content":{"rendered":"<p>If you&#8217;ve deployed sites to <a href=\"https:\/\/en.wikipedia.org\/wiki\/Internet_Information_Services\">IIS<\/a>, at some point, you probably Googled how to make your site <strong>redirect from the non-www to the www<\/strong> version and from the <strong>insecure http version to the more secure https<\/strong> version \u2014 meaning, if someone types <strong>http:\/\/yourdomain.com<\/strong>, you want them to be redirected to <strong>https:\/\/www.yourdomain.com<\/strong>.<\/p>\n<p>In wanting this for my website, I read every article I could, but I didn&#8217;t find a technique that accomplished everything I wanted. This is how I did it.<\/p>\n<h3>Why care about redirecting to www and https?<\/h3>\n<p>Because you want to avoid having &#8220;duplicate content&#8221; on two or more technically different URLs for the benefit of SEO. If you have http:\/\/domain.com and https:\/\/www.mydomain.com serve up the same page, you will be penalized by Google because it&#8217;s now considered &#8220;duplicate content.&#8221; If, however, https:\/\/domain.com does a <strong>permanent 301 redirect<\/strong> to https:\/\/www.mydomain.com, then you&#8217;re following the <strong>best practice for SEO<\/strong>.<\/p>\n<h3>What&#8217;s wrong with other people&#8217;s solutions?<\/h3>\n<p>If you Google for this topic, you&#8217;ll find a few articles, like <a href=\"https:\/\/www.namecheap.com\/support\/knowledgebase\/article.aspx\/9953\/38\/iis-redirect-http-to-https\">this Namecheap article<\/a>. However, it only covers redirecting to <strong>https<\/strong> and not to <strong>www<\/strong>.<\/p>\n<p>This <a href=\"https:\/\/stackoverflow.com\/questions\/32490426\/iis-redirect-non-www-to-www-and-http-to-https\">Stack Overflow article<\/a> has the right idea, but its recommended solution is to combine the forcing of www and SSL into one rule. I disagree with that because it doesn&#8217;t allow for the ease of setting up a development server at <strong>dev.domain.com<\/strong>, where www and SSL aren&#8217;t desired.<\/p>\n<p>This <a href=\"https:\/\/serverfault.com\/questions\/893315\/best-way-to-redirect-all-http-to-https-in-iis\">ServerFault article<\/a> only addresses the <strong>https redirection<\/strong> without taking into account the www issue.<\/p>\n<p>This <a href=\"http:\/\/dinbror.dk\/blog\/iis-url-rewrite-force-non-www-and-ssl\/\">dinbror article<\/a> does a great job, but it teaches you how to convert the www version to non-www, which is a rarer scenario than wanting to redirect the other way around.<\/p>\n<h3>My better way<\/h3>\n<p>Here&#8217;s what the <a href=\"https:\/\/docs.microsoft.com\/en-us\/iis\/extensions\/url-rewrite-module\/creating-rewrite-rules-for-the-url-rewrite-module\">URL Rewrite<\/a> rules in my <strong>web.config<\/strong> look like. I have two separate rules, one for <strong>redirecting the non-www version to www<\/strong>, and one for <strong>redirecting the http version to https<\/strong>.<\/p>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\"> \r\n&lt;rule name=&quot;https fixer&quot; stopProcessing=&quot;true&quot;&gt;\r\n &lt;match url=&quot;.*$&quot; \/&gt;\r\n  &lt;conditions logicalGrouping=&quot;MatchAll&quot;&gt;\r\n   &lt;add input=&quot;{HTTPS}&quot; pattern=&quot;^OFF$&quot; \/&gt;\r\n   &lt;add input=&quot;{HTTP_HOST}&quot; pattern=&quot;dev&quot; negate=&quot;true&quot; \/&gt;\t\t\t\t\t\r\n  &lt;\/conditions&gt;\t\t\t\t\r\n  &lt;action type=&quot;Redirect&quot; url=&quot;https:\/\/www.gmass.co{REQUEST_URI}&quot; appendQueryString=&quot;false&quot; redirectType=&quot;Permanent&quot; \/&gt;\r\n&lt;\/rule&gt;\r\n\t\t\t\t\r\n&lt;rule name=&quot;www fixer&quot; stopProcessing=&quot;true&quot;&gt;\r\n &lt;match url=&quot;.*$&quot; \/&gt;\r\n  &lt;conditions logicalGrouping=&quot;MatchAll&quot;&gt;\r\n   &lt;add input=&quot;{HTTP_HOST}&quot; pattern=&quot;www&quot; negate=&quot;true&quot; \/&gt;\r\n   &lt;add input=&quot;{HTTP_HOST}&quot; pattern=&quot;dev&quot; negate=&quot;true&quot; \/&gt;\r\n  &lt;\/conditions&gt;\r\n  &lt;action type=&quot;Redirect&quot; url=&quot;https:\/\/www.gmass.co{REQUEST_URI}&quot; appendQueryString=&quot;false&quot; redirectType=&quot;Permanent&quot; \/&gt;\r\n&lt;\/rule&gt;\t\r\n<\/pre>\n<p>Why not put all this into <strong>one rule<\/strong>, as other articles have suggested? Because then, if you have a development server, like <strong>dev.domain.com<\/strong>, and you use the same <strong>web.config file<\/strong>, then it will attempt to redirect to https:\/\/www.dev.domain.com and you likely don&#8217;t want that. Instead, you want it so that if you&#8217;re on dev.domain.com, then no redirects occur, because you probably don&#8217;t want to purchase an SSL certificate for your development server. Of course, you could purchase a wildcard SSL cert that covers all sub-domains, but those are expensive.<\/p>\n<p>By breaking the redirects into two different URL Rewrite rules, you can:<\/p>\n<ol>\n<li>Still ensure that <strong>non-www is redirected to www<\/strong><\/li>\n<li>Still ensure that <strong>http is redirected to https<\/strong><\/li>\n<li>Use the <strong>same web.config with your production and your development server<\/strong>, making it so that you <strong>don&#8217;t have to keep track of two config files<\/strong>.<\/li>\n<\/ol>\n<p>Additionally, note that the domain, <strong>gmass.co is hard-coded<\/strong> into the redirect destination URL. That is intentional so that you only ever need one redirect instead of two to fix both the <strong>www<\/strong> and <strong>https<\/strong> issues. You might be tempted to use <strong>{HTTP_HOST}<\/strong> in its place, but if you do that, your results will be wonky, and in some cases, <strong>two redirects will be needed instead of one<\/strong>. The &#8220;https fixer&#8221; rule won&#8217;t redirect to the www version of the site, and the &#8220;www fixer&#8221; rule won&#8217;t direct to the https version of the site.<\/p>\n<p>If you use &#8220;https:\/\/www.{HTTP_HOST}&#8221; in the &#8220;www fixer&#8221; rule, then that would work, but if you did that in the &#8220;https fixer&#8221; rule, then if the user went to <strong>http:\/\/www.domain.com<\/strong>, the user would get redirected to <strong>https:\/\/www.www.domain.com<\/strong>, and you <strong>don&#8217;t want two sets of wwws<\/strong>. Finally, if you use <em>just<\/em> {HTTP_HOST} in the &#8220;https fixer&#8221; rule, then if the user went to http:\/\/domain.com, the &#8220;https fixer&#8221; rule would trigger and redirect the user to <strong>https:\/\/domain.com<\/strong>, and then the &#8220;www fixer&#8221; rule would kick in to redirect the user to <strong>https:\/\/www.domain.com<\/strong>. That accomplishes the objective, but now you&#8217;ve sent the user through two redirects rather than just one. Hard coding your domain into the rule avoids these hassles.<\/p>\n<p>Essentially the logic that you desire, in boolean English, is:<\/p>\n<p>(non-www OR http) AND (not &#8220;dev&#8221;) THEN REDIRECT (https:\/\/www.gmass.co\/{QUERYSTRING})<\/p>\n<p>Of course, with <strong>URL Rewrite<\/strong> rules, you can&#8217;t use parentheses in your boolean logic. You&#8217;re restricted to using a match type of <strong>MatchAny<\/strong> or <strong>MatchAll<\/strong>. If you were to combine everything into <strong>one rule<\/strong> using <strong>MatchAll<\/strong>, that comes <em>close<\/em> to working, but it fails in the case of one condition already being true (www or https) but the other being false. Meaning, if the user goes to http:\/\/mydomain.com, the user will then be redirected to https:\/\/www.mydomain.com as you desire, BUT if the user goes to https:\/\/mydomain.com, the user will NOT be redirected to https:\/\/www.mydomain.com. Similarly, if the user goes to http:\/\/www.mydomain.com, the user will NOT be redirected to https:\/\/www.mydomain.com.<\/p>\n<p>By using two individual rules, however, you can achieve the logic you want, which, in boolean English, is:<\/p>\n<p>(non-www AND not &#8220;dev&#8221;)<br \/>\nredirect to www<\/p>\n<p>(http and NOT &#8220;dev&#8221;)<br \/>\nredirect to https<\/p>\n<h3>See it in action<\/h3>\n<p>You can test this using various gmass.co URLs. If you go to <a href=\"http:\/\/gmass.co\">http:\/\/gmass.co<\/a>, you&#8217;ll be redirected to <a href=\"https:\/\/www.gmass.co\">https:\/\/www.gmass.co<\/a>. Be sure to turn on Chrome&#8217;s Developer Tools to see the Network tab so you can see where you&#8217;re actually being redirected. The latest versions of Chrome hide the &#8220;www&#8221; in the address bar, so you can&#8217;t always decipher the exact URL you&#8217;re visiting.<\/p>\n<p>If you go to <a href=\"https:\/\/gmass.co\">https:\/\/gmass.co<\/a>, you&#8217;ll be directed to <a href=\"https:\/\/www.gmass.co\">https:\/\/www.gmass.co<\/a>. If you go to <a href=\"http:\/\/www.gmass.co\">http:\/\/www.gmass.co<\/a>, you&#8217;ll be redirected to <a href=\"https:\/\/www.gmass.co\">https:\/\/www.gmass.co<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you&#8217;ve deployed sites to IIS, at some point, you probably Googled how to make your site redirect from the non-www to the www version and from the\u2026<\/p>\n","protected":false},"author":2,"featured_media":11693,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[3462,6539],"tags":[],"class_list":["post-11376","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-developers","category-iis"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\r\n<title>A better way to get an IIS site to redirect to www and https<\/title>\r\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\r\n<link rel=\"canonical\" href=\"https:\/\/www.gmass.co\/blog\/iis-site-to-redirect-to-www-and-https\/\" \/>\r\n<meta property=\"og:locale\" content=\"en_US\" \/>\r\n<meta property=\"og:type\" content=\"article\" \/>\r\n<meta property=\"og:title\" content=\"A better way to get an IIS site to redirect to www and https\" \/>\r\n<meta property=\"og:description\" content=\"If you&#8217;ve deployed sites to IIS, at some point, you probably Googled how to make your site redirect from the non-www to the www version and from the\u2026\" \/>\r\n<meta property=\"og:url\" content=\"https:\/\/www.gmass.co\/blog\/iis-site-to-redirect-to-www-and-https\/\" \/>\r\n<meta property=\"og:site_name\" content=\"GMass Blog\" \/>\r\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/GmailMailMerge\/\" \/>\r\n<meta property=\"article:published_time\" content=\"2020-03-17T04:27:54+00:00\" \/>\r\n<meta property=\"article:modified_time\" content=\"2020-03-30T03:12:41+00:00\" \/>\r\n<meta property=\"og:image\" content=\"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2020\/03\/Featured-image-IIS-redirect-86kb.png\" \/>\r\n\t<meta property=\"og:image:width\" content=\"1001\" \/>\r\n\t<meta property=\"og:image:height\" content=\"467\" \/>\r\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\r\n<meta name=\"author\" content=\"Ajay Goel\" \/>\r\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\r\n<meta name=\"twitter:creator\" content=\"@PartTimeSnob\" \/>\r\n<meta name=\"twitter:site\" content=\"@GMassForGmail\" \/>\r\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Ajay Goel\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\r\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.gmass.co\\\/blog\\\/iis-site-to-redirect-to-www-and-https\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.gmass.co\\\/blog\\\/iis-site-to-redirect-to-www-and-https\\\/\"},\"author\":{\"name\":\"Ajay Goel\",\"@id\":\"https:\\\/\\\/www.gmass.co\\\/blog\\\/#\\\/schema\\\/person\\\/b5fa74f8765b860701158fd77162fff8\"},\"headline\":\"A better way to get an IIS site to redirect to www and https\",\"datePublished\":\"2020-03-17T04:27:54+00:00\",\"dateModified\":\"2020-03-30T03:12:41+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.gmass.co\\\/blog\\\/iis-site-to-redirect-to-www-and-https\\\/\"},\"wordCount\":1209,\"commentCount\":11,\"image\":{\"@id\":\"https:\\\/\\\/www.gmass.co\\\/blog\\\/iis-site-to-redirect-to-www-and-https\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.gmass.co\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/03\\\/Featured-image-IIS-redirect-86kb.png\",\"articleSection\":[\"Developers\",\"IIS\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.gmass.co\\\/blog\\\/iis-site-to-redirect-to-www-and-https\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.gmass.co\\\/blog\\\/iis-site-to-redirect-to-www-and-https\\\/\",\"url\":\"https:\\\/\\\/www.gmass.co\\\/blog\\\/iis-site-to-redirect-to-www-and-https\\\/\",\"name\":\"A better way to get an IIS site to redirect to www and https\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.gmass.co\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.gmass.co\\\/blog\\\/iis-site-to-redirect-to-www-and-https\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.gmass.co\\\/blog\\\/iis-site-to-redirect-to-www-and-https\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.gmass.co\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/03\\\/Featured-image-IIS-redirect-86kb.png\",\"datePublished\":\"2020-03-17T04:27:54+00:00\",\"dateModified\":\"2020-03-30T03:12:41+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.gmass.co\\\/blog\\\/#\\\/schema\\\/person\\\/b5fa74f8765b860701158fd77162fff8\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.gmass.co\\\/blog\\\/iis-site-to-redirect-to-www-and-https\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.gmass.co\\\/blog\\\/iis-site-to-redirect-to-www-and-https\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.gmass.co\\\/blog\\\/iis-site-to-redirect-to-www-and-https\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.gmass.co\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/03\\\/Featured-image-IIS-redirect-86kb.png\",\"contentUrl\":\"https:\\\/\\\/www.gmass.co\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/03\\\/Featured-image-IIS-redirect-86kb.png\",\"width\":1001,\"height\":467,\"caption\":\"redirecting to www and https\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.gmass.co\\\/blog\\\/iis-site-to-redirect-to-www-and-https\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.gmass.co\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"A better way to get an IIS site to redirect to www and https\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.gmass.co\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.gmass.co\\\/blog\\\/\",\"name\":\"GMass Blog\",\"description\":\"Tips and tricks for sending mail merge and mass email campaigns directly from Gmail\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.gmass.co\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.gmass.co\\\/blog\\\/#\\\/schema\\\/person\\\/b5fa74f8765b860701158fd77162fff8\",\"name\":\"Ajay Goel\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/f3a70af05bbabe47925150d5a1320540e801b78055a74da20658fc97cd0706a2?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/f3a70af05bbabe47925150d5a1320540e801b78055a74da20658fc97cd0706a2?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/f3a70af05bbabe47925150d5a1320540e801b78055a74da20658fc97cd0706a2?s=96&d=mm&r=g\",\"caption\":\"Ajay Goel\"},\"description\":\"Ajay is the founder of GMass and has been developing email sending software for 20 years.\",\"sameAs\":[\"https:\\\/\\\/twitter.com\\\/PartTimeSnob\",\"https:\\\/\\\/x.com\\\/PartTimeSnob\"],\"url\":\"https:\\\/\\\/www.gmass.co\\\/blog\\\/author\\\/ajay-goel\\\/\"}]}<\/script>\r\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"A better way to get an IIS site to redirect to www and https","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.gmass.co\/blog\/iis-site-to-redirect-to-www-and-https\/","og_locale":"en_US","og_type":"article","og_title":"A better way to get an IIS site to redirect to www and https","og_description":"If you&#8217;ve deployed sites to IIS, at some point, you probably Googled how to make your site redirect from the non-www to the www version and from the\u2026","og_url":"https:\/\/www.gmass.co\/blog\/iis-site-to-redirect-to-www-and-https\/","og_site_name":"GMass Blog","article_publisher":"https:\/\/www.facebook.com\/GmailMailMerge\/","article_published_time":"2020-03-17T04:27:54+00:00","article_modified_time":"2020-03-30T03:12:41+00:00","og_image":[{"width":1001,"height":467,"url":"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2020\/03\/Featured-image-IIS-redirect-86kb.png","type":"image\/png"}],"author":"Ajay Goel","twitter_card":"summary_large_image","twitter_creator":"@PartTimeSnob","twitter_site":"@GMassForGmail","twitter_misc":{"Written by":"Ajay Goel","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.gmass.co\/blog\/iis-site-to-redirect-to-www-and-https\/#article","isPartOf":{"@id":"https:\/\/www.gmass.co\/blog\/iis-site-to-redirect-to-www-and-https\/"},"author":{"name":"Ajay Goel","@id":"https:\/\/www.gmass.co\/blog\/#\/schema\/person\/b5fa74f8765b860701158fd77162fff8"},"headline":"A better way to get an IIS site to redirect to www and https","datePublished":"2020-03-17T04:27:54+00:00","dateModified":"2020-03-30T03:12:41+00:00","mainEntityOfPage":{"@id":"https:\/\/www.gmass.co\/blog\/iis-site-to-redirect-to-www-and-https\/"},"wordCount":1209,"commentCount":11,"image":{"@id":"https:\/\/www.gmass.co\/blog\/iis-site-to-redirect-to-www-and-https\/#primaryimage"},"thumbnailUrl":"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2020\/03\/Featured-image-IIS-redirect-86kb.png","articleSection":["Developers","IIS"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.gmass.co\/blog\/iis-site-to-redirect-to-www-and-https\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.gmass.co\/blog\/iis-site-to-redirect-to-www-and-https\/","url":"https:\/\/www.gmass.co\/blog\/iis-site-to-redirect-to-www-and-https\/","name":"A better way to get an IIS site to redirect to www and https","isPartOf":{"@id":"https:\/\/www.gmass.co\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.gmass.co\/blog\/iis-site-to-redirect-to-www-and-https\/#primaryimage"},"image":{"@id":"https:\/\/www.gmass.co\/blog\/iis-site-to-redirect-to-www-and-https\/#primaryimage"},"thumbnailUrl":"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2020\/03\/Featured-image-IIS-redirect-86kb.png","datePublished":"2020-03-17T04:27:54+00:00","dateModified":"2020-03-30T03:12:41+00:00","author":{"@id":"https:\/\/www.gmass.co\/blog\/#\/schema\/person\/b5fa74f8765b860701158fd77162fff8"},"breadcrumb":{"@id":"https:\/\/www.gmass.co\/blog\/iis-site-to-redirect-to-www-and-https\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.gmass.co\/blog\/iis-site-to-redirect-to-www-and-https\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.gmass.co\/blog\/iis-site-to-redirect-to-www-and-https\/#primaryimage","url":"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2020\/03\/Featured-image-IIS-redirect-86kb.png","contentUrl":"https:\/\/www.gmass.co\/blog\/wp-content\/uploads\/2020\/03\/Featured-image-IIS-redirect-86kb.png","width":1001,"height":467,"caption":"redirecting to www and https"},{"@type":"BreadcrumbList","@id":"https:\/\/www.gmass.co\/blog\/iis-site-to-redirect-to-www-and-https\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.gmass.co\/blog\/"},{"@type":"ListItem","position":2,"name":"A better way to get an IIS site to redirect to www and https"}]},{"@type":"WebSite","@id":"https:\/\/www.gmass.co\/blog\/#website","url":"https:\/\/www.gmass.co\/blog\/","name":"GMass Blog","description":"Tips and tricks for sending mail merge and mass email campaigns directly from Gmail","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.gmass.co\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.gmass.co\/blog\/#\/schema\/person\/b5fa74f8765b860701158fd77162fff8","name":"Ajay Goel","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/f3a70af05bbabe47925150d5a1320540e801b78055a74da20658fc97cd0706a2?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/f3a70af05bbabe47925150d5a1320540e801b78055a74da20658fc97cd0706a2?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/f3a70af05bbabe47925150d5a1320540e801b78055a74da20658fc97cd0706a2?s=96&d=mm&r=g","caption":"Ajay Goel"},"description":"Ajay is the founder of GMass and has been developing email sending software for 20 years.","sameAs":["https:\/\/twitter.com\/PartTimeSnob","https:\/\/x.com\/PartTimeSnob"],"url":"https:\/\/www.gmass.co\/blog\/author\/ajay-goel\/"}]}},"_links":{"self":[{"href":"https:\/\/www.gmass.co\/blog\/wp-json\/wp\/v2\/posts\/11376","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.gmass.co\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.gmass.co\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.gmass.co\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.gmass.co\/blog\/wp-json\/wp\/v2\/comments?post=11376"}],"version-history":[{"count":15,"href":"https:\/\/www.gmass.co\/blog\/wp-json\/wp\/v2\/posts\/11376\/revisions"}],"predecessor-version":[{"id":11628,"href":"https:\/\/www.gmass.co\/blog\/wp-json\/wp\/v2\/posts\/11376\/revisions\/11628"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.gmass.co\/blog\/wp-json\/wp\/v2\/media\/11693"}],"wp:attachment":[{"href":"https:\/\/www.gmass.co\/blog\/wp-json\/wp\/v2\/media?parent=11376"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.gmass.co\/blog\/wp-json\/wp\/v2\/categories?post=11376"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.gmass.co\/blog\/wp-json\/wp\/v2\/tags?post=11376"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}