Setup custom domain URL
  • 08 Sep 2020
  • 4 Minutes To Read
  • Print
  • Share
  • Dark
    Light

Setup custom domain URL

  • Print
  • Share
  • Dark
    Light

By default, your training portal is hosted on <name>.azurewebsites.net where <name>* is the website name entered by administrator at the time of platform deployment and installation.

Why configure a Custom Domain?

Some customers may prefer to keep their domain name at different providers for branding and trust purposes. We give you the option to “map” your learning portal to a domain of your choice.

If you’re looking to host your Microsoft Community Training instance on a custom domain of your choice, follow the instructions below.

Before you begin

  1. Make sure you’ve purchased a domain name of your choice from your domain provider (such as Namecheap, GoDaddy).

  2. Make sure you have access to the DNS registry for your domain provider. For example, to add DNS entries for contoso.com and www.contoso.com, you must be able to configure the DNS settings for the contoso.com root domain.

Steps to configure your custom domain URL

  1. Map the custom DNS name to your Microsoft Community Training instance.

  2. Configure the SSL certificate for your Microsoft Community Training instance.

  3. Next, login to your Azure portal, go to Resource Groups from the left-menu.
    image.png

  4. Click on the resource group belonging to your Microsoft Community Training instance.

  5. Click on the Managed application instance.
    image.png

  6. Click on Managed resource group link.
    image.png

  7. From the list of resources shown, click on the Storage Account resource.
    image.png

  8. Select CORS under settings from the left-menu.
    image.png

  9. Now under Blob Service, please enter the values as below:

  • ALLOWED ORIGINS : Your custom website URL (for example: https://contosolearning.contoso.com & https://www.contosolearning.contoso.com)
Important Note

When custom website URL is provided ensure that there is no backslash '/' at the end of the URL and prefixed with 'https://'

  • ALLOWED METHODS : GET
  • ALLOWED HEADERS : *
  • EXPOSED HEADERS : x-ms-meta-data*
  • MAX AGE : 200
  1. Go back to your managed resource group link from Step 6.

  2. Select the resource for your App Service.

  3. From the left-menu, under Settings, click on Configuration.
    image.png

  4. Update the setting ida:Realm with your custom domain name. For example - https://contosolearning.contoso.com.
    image.png

  5. Update the setting siteRoot with your custom domain name. For example - https://contosolearning.contoso.com.

  6. Next based on your chosen identity type, follow the steps below:

  • For Social Accounts or email based authentication like Google, Microsoft and Facebook follow these steps
  • For Azure Active Directory (aka Work or School account) follow these steps
  • For phone number authentication, create a support ticket from Microsoft Community Training Helpdesk using the following values. Our support team will activate your custom URL in 2-3 business days and notify you of the change.
Field Description
Title Enter "Set up custom domain URL"
Type Select "Request"
Subject Under Infrastructure Management, select "Set up custom domain URL"
Description Provide your existing URL and new custom URL
Important Reminder

Before raising the support ticket for an instance enabled with Phone number authentication, please make sure your training portal is accessible with the configured custom domain. After opening the website, when you click on the SIGN IN the login page should return an error.

For Social Accounts like Google, Microsoft and Facebook

For Production Slot URL

  1. Open B2C Tenant resource from Resource group.

  2. Select Azure Active Directory B2C Settings

  3. Select Applications under Manage and select the application

  4. Under reply URL, please remove the old URLs and then add new custom domain URL in the below format https://{customdomain}/signin-b2c. (e.g.: https://contosolearning.contoso.com/signin-b2c )

Note

Please ensure the case for "/signin-b2c" is exactly as mentioned since the URL is case sensitive.

  1. Click on Save.

For Staging Slot URL

  1. Open B2C Tenant resource from Resource group.

  2. Select Azure Active Directory B2C Settings

  3. Create a new application. (+ Add)

  4. Enter the name of the application.

  5. Switch on “Web App / Web API”

  6. Make sure “Allow implicit flow” is turned off and “Native Client” is turned off.

  7. Set the reply URI for Azure AD B2C as <basedomain>/signin-b2c (e.g.: https://<name>-staging.azurewebsites.net/signin-b2c. This URL will serve as a temporary testing URL on which the website will be deployed before moving to production.

Note

Please ensure the case for "/signin-b2c" is exactly as mentioned since the URL is case sensitive.

  1. Click on Create

For Azure Active Directory (Work or School account)

For Production Slot URL

  1. In Azure portal, select Azure Active Directory.

  2. Then select App registrations.

  3. Select the application from list of registered apps.

  4. Select Authentication.

  5. Now add the redirect URL in following format, https://{customdomain}/signin-azureAD (e.g.: https://contosolearning.contoso.com/signin-azureAD )

Note

Please ensure the case for "/azureAD" is exactly as mentioned since the URL is case sensitive.

  1. Click on Save.

For Staging Slot URL

  1. In Azure portal, select Azure Active Directory.

  2. Then select App registrations.

  3. Click + New application registration.

  4. Enter Name of the application, select Application type “Web app/API”

  5. Now add the redirect URL in following format, https://{websitename}-staging/signin-azureAD (e.g https://contosolearning-staging.azurewebsites.net/signin-azureAD )

Note

Please ensure the case for "/azureAD" is exactly as mentioned since the URL is case sensitive.

  1. Click on Create

Troubleshoot for Custom Domain URL Setup

Following are some troubleshooting steps for the scenario when your website is not reachable even after following all of the above mentioned steps,
image.png

  1. Check the DNS entry is propagated by any online tool available. Example. There can be 2 cases,
    (a). No entry present
    image.png

Steps to mitigate
Update dns record in corresponding DNS provider. In the above case, the domain was purchased from Microsoft 365, so you will need to follow this documentation.
Every dns provider will have similar documentations. This is one more example from Godaddy

(b). DNS entry is wrong
image.png

Steps to mitigate
The domain record should point to the correct azurewebsites url. For example,
image.png

  1. Check custom domain mapping is present in Azure portal like this,
    image.png

Follow this documentation for proper domain mapping in azure portal.

Was This Article Helpful?