Skip to main content Skip to footer

How to assign multiple hostnames or IP addresses

Any live website should only be served via a single domain. Any other domains (e.g. or you own that are pointing to your website should redirect to a single domain. This is very important for SEO as each domain is seen as a unique site by google so the more domains you have pointing to a site without a redirect to the main domain will negatively affect your SEO.

Step 1

Add your redirect rules to the web.config file of your website. In the following example, is the main domain of your website.

<rule name="Redirect to main domain" patternSyntax="Wildcard" stopProcessing="true">
<match url="*" />
<conditions logicalGrouping="MatchAny">
<add input="{HTTP_HOST}" pattern="" />
<add input="{HTTP_HOST}" pattern="" />
<add input="{HTTP_HOST}" pattern="" />
<action type="Redirect" url="{R:0}" />


Step 2

If your website is served via https, change the action type above to:

<action type="Redirect" url="{R:0}" />

And then add the following rule:

<rule name="HTTP to HTTPS redirect" stopProcessing="true">
<match url="(.*)" />
<add input="{HTTPS}" pattern="off" ignoreCase="true" />
<action type="Redirect" redirectType="Permanent" url="https://{HTTP_HOST}/{R:1}" />


Step 3

If your secure certificate has been assigned an IP address which can be directly used to access your website, you will also need to add the unique IP address assigned to your secure certificate to your conditions group.

<add input="{HTTP_HOST}" pattern="YOUR IP ADDRESS" />

Using this approach your website will always be served via no matter what domains or IP addresses are pointing to your website and your uSkinned domain license will always work.