Note that there are some explanatory texts on larger screens.

plurals
  1. POAzure - hostheader not accepting host without the www
    text
    copied!<p>I have set up my hostheader in the service definintion file as follows:</p> <pre><code>&lt;Site name="Example" physicalDirectory="..\example.WebUx"&gt; &lt;Bindings&gt; &lt;Binding name="Example" endpointName="HttpIn" hostHeader="www.example.com" /&gt; &lt;/Bindings&gt; &lt;/Site&gt; </code></pre> <p>When I enter www.example.com it goes to the correct web site in my role. However when I enter just example.com without the www then it goes to the default web. I tried the following and it didn't help:</p> <pre><code>&lt;Site name="Example" physicalDirectory="..\Example.WebUx"&gt; &lt;Bindings&gt; &lt;Binding name="Example" endpointName="HttpIn" hostHeader="www.example.com" /&gt; &lt;Binding name="Example" endpointName="HttpIn" hostHeader="example.com" /&gt; &lt;/Bindings&gt; &lt;/Site&gt; </code></pre> <p>I tried the following and it came up with an error message "Error 1 Found duplicate site elements defined with same virtual path 'Example/' for role Default.WebUx</p> <pre><code>&lt;Site name="Example" physicalDirectory="..\Example.WebUx"&gt; &lt;Bindings&gt; &lt;Binding name="Example" endpointName="HttpIn" hostHeader="www.example.com" /&gt; &lt;/Bindings&gt; &lt;/Site&gt; &lt;Site name="Example" physicalDirectory="..\Example.WebUx"&gt; &lt;Bindings&gt; &lt;Binding name="Example" endpointName="HttpIn" hostHeader="example.com" /&gt; &lt;/Bindings&gt; &lt;/Site&gt; </code></pre> <p>I tried just the following and it didn't work. When implemented this way both the www.example.com and example.com went to the default web.</p> <pre><code>&lt;Site name="Example" physicalDirectory="..\Example.WebUx"&gt; &lt;Bindings&gt; &lt;Binding name="Example" endpointName="HttpIn" hostHeader="example.com" /&gt; &lt;/Bindings&gt; &lt;/Site&gt; </code></pre> <p>I'm running out of ideas :-( Does anyone have experience of setting up the hostHeader so that it can accept both the www and non-www versions of my web sites. </p> <p>Thanks</p> <p>Here's some links that I also checked. Unfortunately they don't seem to help</p> <p><a href="http://msdn.microsoft.com/en-us/library/gg433110.aspx" rel="nofollow" title="link">Link 1</a></p> <p><a href="http://msdn.microsoft.com/en-us/library/gg557553.aspx#Sites" rel="nofollow" title="link 2">Link 2</a></p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload