Domain Forwarding

Christoph Reckers 0 Reputation points
2025-03-11T07:37:24.1533333+00:00

I also purchased a domain via Microsoft with my Azure subscription back then. I would now like to set up a redirect so that if someone goes to my domain www.mydomain.com with the web browser, they are redirected to a domain www.mydomain.de with another provider.

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
8,963 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Pravallika Kothaveeranna Gari 955 Reputation points Microsoft External Staff Moderator
    2025-04-29T12:34:22.02+00:00

    Hello Christoph Reckers,

    You can use Azure Front Door to redirect a URL based on path. Refer this MSDOC to configure Redirect URL using Front Door.

    1. Create an Azure Front Door (classic/Premium).
    2. Configure the Front Door to redirect traffic from www.mydomain.com to www.mydomain.de.
    3. Create a CNAME record for www.mydomain.com and point it to the Front Door endpoint.
    4. Navigate to Azure Front Door=>Settings=>Rule Sets, click add. set up a redirect rule to forward requests from www.mydomain.com to www.mydomain.de.

    enter image description here

    If it is single redirect, you can use an Azure App Service with a redirect rule.

    • In App Service => Custom domains => Add custom domain=> add your domain www.mydomain.com and validate. It will show a prompt to verify domain ownership via DNS (CNAME or TXT record in DNS settings).

    enter image description here

    Navigate to KUDU site of web app https://appname.azurewebsites.net/ =>Debug Console=>CMD=>Site/wwwroot => Create a web.config file to issue a 301 Permanent Redirect to www.mydomain.de.

    enter image description here

    Add below configuration in web.config:

    
    <configuration>
    
        <system.webServer>
    
          <rewrite>
    
            <rules>
    
              <rule name="Rewrite to domain.de">
    
                <match url="^(.*)$" />
    
                <action type="Redirect" url="https://www.mydomain.de" />
    
              </rule>
    
            </rules>
    
          </rewrite>
    
        </system.webServer>
    
    </configuration>
    
    

    This redirects the requests of www.mydomain.com to www.mydomain.de

    Hope this helps.


    Please do not forget to click "Accept the answer” and Yes wherever the information provided helps you, this can be beneficial to other community members.

    User's image

    If you have any other questions or still running into more issues, let me know in the "comments" and I would be happy to help you.


  2. Christoph Reckers 0 Reputation points
    2025-04-30T06:09:29.5533333+00:00

    Thanks for the detailed information. I will check it out and give you feedback.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.