1. Home
  2. How To
  3. Cloud
  4. How To Add DNS Record To Connect Your Domain

How To Add DNS Record To Connect Your Domain

In the event that you bought a domain from a third-party hosting provider, you able to connect it to Microsoft 365 by updating the DNS records in your registrar account.

If you do not include a domain, individuals in your organization will use the onmicrosoft.com domain for their email address. It is critical to include your domain before you add users, if not you will need to set them up twice and is is waste of time.

Fixes

Step 1: Add A TXT Record To Verify You Own The Domain

  1. Sign in to Microsoft 365 admin center and select Show all -> Settings -> Domains
  2. Open up a new browser tab, sign in to your DNS hosting provider, then find where you manage your DNS settings.
  3. Surf to your hosting provider DNS Manager page, and add the TXT record indicated in the admin center to your domain.

    Example:

    • TXT Name: @
    • TXT Value: MS=ms######## (unique ID from the admin center)
    • TTL: 3600(or your provider default)
  4. Save the record, go back to the admin center and then select Verify. It normally take about 15 minutes for record changes to register, however sometimes it can take longer.
  5. When Microsoft finds the correct TXT record, your domain is verified.

Step 2: Add NS Record To Connect Microsoft Services

  • Open up a new tab in the browser, then sign into your DNS hosting provider and find where your DNS settings
  1. Add an MX record for the email ( Outlook, Exchange Online)
    1. If the users already have email with your domain, then just create their accounts in the admin center before setting up the MX Records.
    2. In the event that you update your domain MX record, all new email for anyone who uses your domain will now come to Microsoft 365.
    3. On your hosting provider website, add a new MX record. Ensure that the fields are set to these values:
      • Record Type: MX
      • Priority: Set to the highest value available, typically 0.
      • Host Name: @
      • Points to address: Copy the value from the admin center and paste it here.
      • TTL: 3600‎(or your provider default)
    4. Save the record, then delete any other MX record.
  2. Add CNAME records to connect other services (Teams, Exchange Online, AAD, MDM)
    1. On your Hosting provider website, Include CNAME records for each services that you want to connect. Ensure that all the fields are set to the following values:
      • Record Type: CNAME (Alias)
      • Host: Paste the values you copy from the admin center here.
      • Points to address: Copy the value from the admin center and paste it here.
      • TTL: 3600‎(or your provider default)
  3. Add or edit an SPF TXT record to help prevent email spam ( Outlook, Exchange Online)
    1. In the event that you already have an SPF record for your domain, do not create a new one for Microsoft 365. Instead, add the required Microsoft 365 values to the current record on your hosting provider website so that you have a single SPF record that includes both sets of values
    2. On you hosting provider website, edit the existing SPF record or create an SPF record. Ensure that the fields are set to the following values:
      • Record Type: TXT (Text)
      • Host: @
      • TXT Value: v=spf1 include:spf.protection.outlook.com -all
      • TTL: 3600‎(or your provider default)
    3. Save the record
      1. Remember to validate your SPF record by using one of the SPF validation tools
        • SPF is designed to assist in prevent spoofing, however there are spoofing techniques that SPF cannot protect against. In order to protect again these, you should set up DKIM and DMARC for Microsoft 365
  4. Add SRV records for communication services (Teams, Skype for Business)
    1. On your hosting provider website, add SRV records for each services that you want to connect. Ensure the following fields are set to the following values:
      • Record Type: SRV (Service)
      • Name: @
      • Target: Copy the value from the admin center and paste it here.
      • Protocol: Copy the value from the admin center and paste it here.
      • Service: Copy the value from the admin center and paste it here.
      • Priority: 100
      • Weight: 1
      • Port: Copy the value from the admin center and paste it here.
      • TTL: 3600(or your provider default
    2. Save the changes of the record
  5. SRV record field restrictions and workarounds
    1. Name
      • In the event that your hosting provider dose not permit setting this field to @ then just leave it blank. Use this method only when your hosting provider has separate fields for the service and protocols values.
    2. Service and Protocol
      • In the event that your hosting provider dose not give these fields to SRV records, you should determine the Service and Protocol values in the record Name
        • Same meaning as:
          1. Host
          2. Hostname
          3. Subdomain
      • To include these values, you need to create a single string, isolating the values with a dot.
        • Example: _sip._tls
    3. Priority, Weight, and Port
      • On the off chance that your hosting provider dose not giving these fields to SRV records, you should determine them in the record Target
        • Target is as same as:
          1. Content
          2. IP Address
          3. Target Host
      • To Include These values, you need to create a single string and separating the values with spaces and sometimes ending with a dot. ( If you are unsure about this, it is important that you check with your hosting provider). The values must added in this order: Priority, Weight, Port, Target
        • Example:
          1. Example 1: 100 1 443 sipdir.online.lync.com.
          2. Example 2: 100 1 443 sipdir.online.lync.com

Updated on July 6, 2020

Was this article helpful?

Related Articles

Need Help?
Submit a ticket to us and let our professional team assists you

Support Billing Sales
Support
Billing
Sales