ISS domain redirect from old domain to new with subdomain

Default web.config file

<configuration>
<system.webServer>
<rewrite>
<rules>

</rules>
</rewrite>
</system.webServer>
</configuration>

 

Add this between <rules> and</rules>

<rule name=”domain_redirect” stopProcessing=”true”>
<match url=”(.*)” />
<conditions>
<add input=”{HTTP_HOST}” pattern=”^www\.olddomain\.de$” />
</conditions>
<action type=”Redirect” url=”https://www.newdomain.de/{R:1}” redirectType=”Permanent” />
</rule>

 

Replace olddomain and newdomain with your value and maybe change the www value to your subdomain.

Maintenance Website with Microsoft Azure Traffic Manager profiles

 
1. Create traffic manager profile
 

 

 

2. Add endpoints It is important that you add only web services from different locations!!!
 

 
 
3. Add the CNAME record on your DNS
 
portal.domain.de CNAME yourazuretrafficmanager.azuretrafficmanager.de.
 
 
4. If you need SSL/HTTPS you must configure all web services with the same domain and SSL certificate