Create DNS records at Gandi.net for Office 365

If Gandi.net is your DNS hosting provider, follow the steps in this article to verify your domain and set up DNS records for email, Skype for Business Online, and so on.

There are two main parts to this process: first you will verify your domain, and then you will add DNS records to it. (Need more help? Get support.)

Verify your domain

Add DNS records to your domain

To verify and configure your domain for Office 365, you need to add several DNS records to that domain, using what is called a zone file. You cannot edit an active Gandi.net zone file. Instead, you will make only one copy of the active Gandi.net zone file for the purpose of verifying your domain, and then create only one other copy in which you will create all of your DNS records for Office 365.

When you have completed both of these tasks, your Gandi.net domain will be set up to work with Office 365 services.

To learn about webhosting and DNS for websites with Office 365, see Use a public website with Office 365.

Note:  Typically it takes about 15 minutes for DNS changes to take effect. However, it can occasionally take longer for a change you've made to update across the Internet's DNS system. If you’re having trouble with mail flow or other issues after adding DNS records, see Troubleshoot issues after changing your domain name or DNS records.

Create a zone file for Office 365 verification

To verify your domain for Office 365, you need to add a record to the zone file for that domain. As stated above, you cannot edit an active Gandi.net zone file. Instead, you will make only one copy of the active Gandi.net zone file to use in the process of verifying your Gandi.net domain with Office 365.

(When you have completed the verification process, you will create only one other copy, in which you will create all of your DNS records for Office 365.)

This first zone file is used only to help verify that you own your domain; it doesn’t affect anything else. You can delete it later, if you like. (The second zone file, on the other hand, you will keep, as it will contain all of the DNS records that you have created so that your domain will work with Office 365.)

  1. To get started, go to your domains page at Gandi.net by using this link. You'll be prompted to log in first.

    GandiNet-BP-Configure-1-1

  2. On the Domains page, select the check box beside the name of the domain that you're changing.

    Then, in the Select the lines and choose an action drop-down list that opens, scroll to the Technical changes section, and then choose Change the zone file.

    GandiNet-BP-Configure-1-2

  3. On the Batch zone file change page, in the Default Gandi zone file row, choose the Modify (pencil) icon.

    GandiNet-BP-Configure-1-3

  4. In the Zone file versions area, choose Normal in the Edit mode.

    GandiNet-BP-Configure-1-4-1

  5. Then choose Copy this zone to edit.

    GandiNet-BP-Configure-1-4-2

  6. In the Copy a zone dialog box, type a new zone name in the Name field (for example, Office 365 Verify).

    GandiNet-BP-Configure-1-5-1

  7. Then choose Submit.

    GandiNet-BP-Configure-1-5-2

  8. On the Zones > zone_name page, choose Create a new version.

    GandiNet-BP-Configure-1-6

Now that you have created the zone file, go on to the next section, where you will add the TXT record that you will need in order to verify your Gandi.net domain with Office 365.

Back to top

Add a TXT record for verification

If you have not already done so, complete the Create a zone file for Office 365 verification procedure in the first section of this article before you begin the procedure in this section.

Before you use your domain with Office 365, we have to make sure that you own it. Your ability to log in to your account at your domain registrar and create the DNS record proves to Office 365 that you own the domain.

Note:  This record is used only to verify that you own your domain; it doesn’t affect anything else. You can delete it later, if you like.

  1. To get started, go to your domains page at Gandi.net by using this link. You'll be prompted to log in first.

    GandiNet-BP-Configure-1-1

  2. On the Domains page, select the check box beside the name of the domain that you're changing.

    Then, in the Select the lines and choose an action drop-down list that opens, scroll to the Technical changes section, and then choose Change the zone file.

    GandiNet-BP-Configure-1-2

  3. On the Batch zone file change page, in the row for the zone file you created for Office 365 verification, choose the Modify (pencil) icon.

    GandiNet-BP-Configure-1-14

  4. In the Zone file versions area, choose Version 2.

    (Do not yet choose Use this version.)

    GandiNet-BP-Configure-1-7

  5. Still in the Zone file versions area, choose Add.

    (You may have to scroll down.)

    GandiNet-BP-Configure-1-8

  6. In the Add a record section, in the boxes for the new record, type or copy and paste the values from the following table.

    (Select the Type, TTL, and hours values from the drop-down lists.)

    Type

    TTL

    Name

    Value

    TXT

    1 hours

    @

    MS=msXXXXXXXX

    Note: This is an example. Use your specific Destination or Points to Address value here, from the table in Office 365.
    How do I find this?

    GandiNet-BP-Verify-1-1

  7. Choose Submit to confirm your changes.

    GandiNet-BP-Verify-1-2

Now that you have created the TXT file that Office 365 will use to verify your Gandi.net domain, go on to the next section, where you will activate the new zone file that contains the record.

Back to top

Activate the zone file for Office 365 verification

If you have not already done so, complete the procedures in the first two sections of this article (Create a zone file for Office 365 verification and Add a TXT record for verification) before you begin the procedure in this section.

Now you will update your Gandi.net default settings, so that the Office 365 verification zone file becomes the active zone file for the domain that you're changing.

Warning: Failure to do this will prevent Office 365 from verifying your domain.

  1. In the Zone file versions area, choose Version 2.

    GandiNet-BP-Configure-1-9-1

  2. Then choose Use this version.

    GandiNet-BP-Configure-1-9-2

  3. In the Use this version dialog box, choose Submit.

    GandiNet-BP-Configure-1-10

  4. On the top navigation bar, choose Domains.

    GandiNet-BP-Configure-1-11

  5. On the Domains page, select the check box beside the name of the domain that you're changing.

    Then, in the Select the lines and choose an action drop-down list that opens, scroll to the Technical changes section, and then choose Change the zone file.

    GandiNet-BP-Configure-1-2

  6. On the Batch zone file change page, find the new zone file, and then choose Choose.

    GandiNet-BP-Configure-1-12

  7. Choose Submit to confirm your changes.

    GandiNet-BP-Configure-1-13

To complete the process of verifying your Gandi.net domain with Office 365, follow the instructions in the next section.

Back to top

Verify your domain with Office 365

If you have not already done so, complete the procedures in the first three sections of this article (Create a zone file for Office 365 verification, Add a TXT record for verification, and Activate the zone file for Office 365 verification) before you begin the procedure in this section.

Now that you've added the record at your domain registrar's site, you'll go back to Office 365 and request Office 365 to look for the record.

When Office 365 finds the correct TXT record, your domain is verified.

  1. Go to the Domains page.

  2. On the Manage domains page, select the domain that you are verifying and then, in the Action column for that domain, choose Start setup.

    O365-BP-Verify-1-2

  3. On the Add this TXT record to show you own domain_name page, choose Okay, I've added the record.

    O365-BP-Verify-1-3

  4. Choose Next.

    O365-BP-Verify-1-4

Note:  Typically it takes about 15 minutes for DNS changes to take effect. However, it can occasionally take longer for a change you've made to update across the Internet's DNS system. If you’re having trouble with mail flow or other issues after adding DNS records, see Troubleshoot issues after changing your domain name or DNS records.

Now that you have verified your Gandi.net domain with Office 365, you can go on to create only one other copy of the active Gandi.net zone file, in which you will create all of the DNS records that your Gandi.net domains will need to work with Office 365. The remaining sections in this article will guide you through that process.

Back to top

Create a zone file for Office 365 DNS records

If you have not yet verified your Gandi.net domain with Office 365, do so now by following the procedures in the first four sections of this article, beginning with Create a zone file for Office 365 verification.

The zone file that you will create now is where you will create the DNS records that you need for Office 365. Your Office 365 account will not work without these records. When you have finished creating all of your DNS records, you will designate this zone file as your active Gandi.net zone file, using it instead of the zone file that you created to verify your domain in the previous sections.

  1. To get started, go to your domains page at Gandi.net by using this link. You'll be prompted to log in first.

    GandiNet-BP-Configure-1-1

  2. On the Domains page, select the check box beside the name of the domain that you're changing.

    Then, in the Select the lines and choose an action drop-down list that opens, scroll to the Technical changes section, and then choose Change the zone file.

    GandiNet-BP-Configure-1-2

  3. On the Batch zone file change page, in the Default Gandi zone file row, choose the Modify (pencil) icon.

    GandiNet-BP-Configure-1-15

  4. In the Zone file versions area, choose Normal in the Edit mode drop-down list.

    GandiNet-BP-Configure-1-4-1

  5. Then choose Copy this zone to edit.

    GandiNet-BP-Configure-1-4-2

  6. In the Copy a zone dialog box, type a new zone name in the Name field (for example, Office 365 DNS Records).

    GandiNet-BP-Configure-1-16-1

  7. Then choose Submit.

    GandiNet-BP-Configure-1-16-2

  8. On the Zones > zone_name page, choose Create a new version.

    GandiNet-BP-Configure-1-17

Now that you have created the new zone file, you will add to it all of the DNS records that your Gandi.net domain must contain to work correctly with Office 365. You will create four types of records: MX, CNAME, SPF, and SRV. You can create these records in any order, but you should create all of them before you activate your new zone file, which you will do in the final section of this article.

Back to top

Add an MX record so email for your domain will come to Office 365

Important: Before you create DNS records for your Gandi.net domain, you must first verify your domain with Office 365 (see the first four sections of this article) and then Create the zone file in which you will create the DNS records. When you have created all of the records that you need, you will activate the zone file.

  1. To get started, go to your domains page at Gandi.net by using this link. You'll be prompted to log in first.

    GandiNet-BP-Configure-1-1

  2. On the Domains page, select the check box beside the name of the domain that you're changing.

    Then, in the Select the lines and choose an action drop-down list that opens, scroll to the Technical changes section, and then choose Change the zone file.

    GandiNet-BP-Configure-1-2

  3. On the Batch zone file change page, in the row for the zone file you created for Office 365 DNS records, choose the Modify (pencil) icon.

    GandiNet-BP-Configure-1-18

  4. In the Zone file versions area, choose Version 2.

    (Do not yet choose Use this version.)

    GandiNet-BP-Configure-1-7

  5. Still in the Zone file versions area, choose Add.

    (You may have to scroll down.)

    GandiNet-BP-Configure-1-8

  6. In the Add a record section, in the boxes for the new record, type or copy and paste the values from the following table.

    (Select the Type, TTL, and hours values from the drop-down lists.)

    Type

    TTL

    Name

    Value

    MX Priority

    MX

    1 hours

    @

    <domain-key>.mail.protection.outlook.com.

    This value MUST end with a period (.)

    Note: Get your <domain-key> from your Office 365 portal account.
    How do I find this?

    0

    For more information about priority, see What is MX priority?

    GandiNet-BP-Configure-2-1

  7. Choose Submit.

    GandiNet-BP-Configure-2-2

  8. If there are any other MX records, delete one of them by choosing the Delete (X) icon for that record.

    GandiNet-BP-Configure-2-3

  9. Choose Delete to confirm the deletion.

    GandiNet-BP-Configure-2-4

  10. Use the same process to delete any other remaining MX records, leaving only the one that you created earlier in this procedure.

Back to top

Add the four CNAME records that are required for Office 365

Important: Before you create DNS records for your Gandi.net domain, you must first verify your domain with Office 365 (see the first four sections of this article) and then Create the zone file in which you will create the DNS records. When you have created all of the records that you need, you will activate the zone file.

  1. To get started, go to your domains page at Gandi.net by using this link. You'll be prompted to log in first.

    GandiNet-BP-Configure-1-1

  2. On the Domains page, select the check box beside the name of the domain that you're changing.

    Then, in the Select the lines and choose an action drop-down list that opens, scroll to the Technical changes section, and then choose Change the zone file.

    GandiNet-BP-Configure-1-2

  3. On the Batch zone file change page, in the row for the zone file you created for Office 365 DNS records, choose the Modify (pencil) icon.

    GandiNet-BP-Configure-1-18

  4. In the Zone file versions area, choose Version 2.

    (Do not yet choose Use this version.)

  5. Still in the Zone file versions area, choose Add.

    (You may have to scroll down.)

    GandiNet-BP-Configure-1-7

  6. Add the first of the four CNAME records.

    In the Add a record section, in the boxes for the new record, type or copy and paste the values from the first row of the following table.

    (Select the Type, TTL, and hours values from the drop-down lists.)

    Type

    TTL

    Name

    Value

    CNAME

    1 hours

    autodiscover

    autodiscover.outlook.com.

    This value MUST end with a period (.)

    CNAME

    1 hours

    sip

    sipdir.online.lync.com.

    This value MUST end with a period (.)

    CNAME

    1 hours

    lyncdiscover

    webdir.online.lync.com.

    This value MUST end with a period (.)

    CNAME

    1 hours

    msoid

    clientconfig.microsoftonline-p.net.

    This value MUST end with a period (.)

    GandiNet-BP-Configure-3-1

  7. Choose Submit.

    GandiNet-BP-Configure-3-2

  8. Add the other three CNAME records.

    In the Zone file versions area, choose Add, create a record using the values from the next row in the table, and then again choose Submit to complete that record.

    Repeat this process until you have created all four CNAME records.

  9. Important: If you have Mobile Device Management (MDM) for Office 365, then you must create two additional CNAME records. Follow the procedure that you used for the other four CNAME records, but supply the values from the following table.

    (If you do not have MDM, you can skip this step.)

    Type

    TTL

    Name

    Value

    CNAME

    1 hours

    enterpriseregistration

    enterpriseregistration.windows.net.

    This value MUST end with a period (.)

    CNAME

    1 hours

    enterpriseenrollment

    enterpriseenrollment.manage.microsoft.com.

    This value MUST end with a period (.)

Back to top

Add a TXT record for SPF to help prevent email spam

Important: You cannot have more than one TXT record for SPF for a domain. If your domain has more than one SPF record, you'll get email errors, as well as delivery and spam classification issues. If you already have an SPF record for your domain, don't create a new one for Office 365. Instead, add the required Office 365 values to the current record so that you have a single SPF record that includes both sets of values. Need examples? Check out these details and sample SPF records. To validate your SPF record, you can use one of these SPF validation tools.

Important: Before you create DNS records for your Gandi.net domain, you must first verify your domain with Office 365 (see the first four sections of this article) and then Create the zone file in which you will create the DNS records. When you have created all of the records that you need, you will activate the zone file.

  1. To get started, go to your domains page at Gandi.net by using this link. You'll be prompted to log in first.

    GandiNet-BP-Configure-1-1

  2. On the Domains page, select the check box beside the name of the domain that you're changing.

    Then, in the Select the lines and choose an action drop-down list that opens, scroll to the Technical changes section, and then choose Change the zone file.

    GandiNet-BP-Configure-1-2

  3. On the Batch zone file change page, in the row for the zone file you created for Office 365 DNS records, choose the Modify (pencil) icon.

    GandiNet-BP-Configure-1-18

  4. In the Zone file versions area, choose Version 2.

    (Do not yet choose Use this version.)

    GandiNet-BP-Configure-1-7

  5. Still in the Zone file versions area, choose Add.

    (You may have to scroll down.)

    GandiNet-BP-Configure-1-8

  6. In the Add a record section, in the boxes for the new record, type or copy and paste the values from the following table.

    (Select the Type, TTL, and hours values from the drop-down lists.)

    Type

    TTL

    Name

    Value

    TXT

    1 hours

    @

    v=spf1 include:spf.protection.outlook.com -all

    Note: We recommend copying and pasting this entry, so that all of the spacing stays correct.

    GandiNet-BP-Configure-4-1

  7. Choose Submit.

    GandiNet-BP-Configure-4-2

Back to top

Add the two SRV records that are required for Office 365

Important: Before you create DNS records for your Gandi.net domain, you must first verify your domain with Office 365 (see the first four sections of this article) and then Create the zone file in which you will create the DNS records. When you have created all of the records that you need, you will activate the zone file.

  1. To get started, go to your domains page at Gandi.net by using this link. You'll be prompted to log in first.

    GandiNet-BP-Configure-1-1

  2. On the Domains page, select the check box beside the name of the domain that you're changing.

    Then, in the Select the lines and choose an action drop-down list that opens, scroll to the Technical changes section, and then choose Change the zone file.

    GandiNet-BP-Configure-1-2

  3. On the Batch zone file change page, in the row for the zone file you created for Office 365 DNS records, choose the Modify (pencil) icon.

    GandiNet-BP-Configure-1-18

  4. In the Zone file versions area, choose Version 2.

    (Do not yet choose Use this version.)

    GandiNet-BP-Configure-1-7

  5. Still in the Zone file versions area, choose Add.

    (You may have to scroll down.)

    GandiNet-BP-Configure-1-8

  6. Add the first of the two SRV records.

    In the boxes for the new record, type or copy and paste the values from the first row of the following table.

    (Select the Type, TTL, and hours values from the drop-down lists.)

    Type

    TTL

    Name

    Value

    SRV

    1 hours

    _sip._tls

    100 1 443 sipdir.online.lync.com.

    This value MUST end with a period (.)

    Note: We recommend copying and pasting this entry, so that all of the spacing stays correct.

    SRV

    1 hours

    _sipfederationtls._tcp

    100 1 5061 sipfed.online.lync.com.

    This value MUST end with a period (.)

    Note: We recommend copying and pasting this entry, so that all of the spacing stays correct.

    GandiNet-BP-Configure-5-1

  7. Choose Submit.

    GandiNet-BP-Configure-5-2

  8. Add the other SRV record:

    In the Zone file versions area, choose Add, create a record using the values from the next row in the table, and then again choose Submit to complete that record.

Back to top

Activate the zone file for Office 365 DNS records

Important: If you have not yet verified your domain and created all of the DNS records that you need, we strongly recommend that you do so before performing this final procedure. All of the instructions you will need are provided in the preceding sections of this article.

If you have now verified your domain and created all of the MX, CNAME, SPF, and SRV records that you need for Office 365, you will now again update your Gandi.net default settings, this time so that the Office 365 DNS Records zone file replaces the Office 365 Verification zone file, becoming the active zone file for the domain that you're changing.

Warning: Failure to make this change will prevent your Gandi.net domain from working properly with Office 365.

  1. In the Zone file versions area, choose Version 2.

    GandiNet-BP-Configure-1-9-1

  2. Then choose Use this version.

    GandiNet-BP-Configure-1-9-2

  3. In the Use this version dialog box, choose Submit.

    GandiNet-BP-Configure-1-10

  4. On the top navigation bar, choose Domains.

    GandiNet-BP-Configure-1-19

  5. On the Domains page, select the check box beside the name of the domain that you're changing.

    Then, in the Select the lines and choose an action drop-down list that opens, scroll to the Technical changes section, and then choose Change the zone file.

    GandiNet-BP-Configure-1-2

  6. On the Batch zone file change page, find the new zone file (the one to which you’ve added all of your Office 365 DNS records), and then choose Choose.

    GandiNet-BP-Configure-1-20

  7. Choose Submit to confirm your changes.

    GandiNet-BP-Configure-1-21

Note:  Typically it takes about 15 minutes for DNS changes to take effect. However, it can occasionally take longer for a change you've made to update across the Internet's DNS system. If you’re having trouble with mail flow or other issues after adding DNS records, see Troubleshoot issues after changing your domain name or DNS records.

Back to top

Still need help?

Get help from the Office 365 community forums Admins: Sign in and create a service request Admins: Call Support

Back to top

Share Facebook Facebook Twitter Twitter Email Email

Was this information helpful?

Great! Any other feedback?

How can we improve it?

Thank you for your feedback!

×