Add or edit custom DNS records in Office 365

We're updating this article! Send an email and let us know what you'd like to see.
Email: Office 365 Admin Content Feedback

Telephone

Want some help?                                   

Call support.

If Office 365 manages your DNS records, you can add custom DNS records for your domain right in Office 365. You can do this any time after you add your domain to Office 365 and switch your nameserver (NS) records to point to Office 365. You might want to add a DNS record, for example, to redirect Internet traffic for one of your domains to a website that you host with another provider.

You can edit your custom DNS records later if you need to make changes.

Add or edit custom DNS records using Office 365 setup in the Office 365 admin center

  1. Sign in to Office 365 with your work or school account.

  2. Go to the Domains page.

    Click Domains on Office 365 Admin page
  3. On the Domains page, select a domain.

    Choose a domain

  4. Under DNS settings, choose Custom Records, and then choose New custom record.

    Choose New custom record under Custom Records

  5. Choose the type of DNS record you want to add, and type the information for the new record.

    Choose record type and type in details

  6. Choose Save.

Can’t update the A record or the CNAME record?

If you have a SharePoint Online Public Website and you’ve changed your Office 365 public website URL to use your custom domain name, Office 365 may have set your domain’s A record and CNAME record for you. When that happens, you can’t edit the A record or the CNAME record yourself.

To free it up so you can change these records, you must change the URL for your public website back to the default URL.

Here's how to do that if you have Office 365 for Small Business. (If you have a different Office 365 plan, learn about setting up and changing your public website URL.)

  1. Sign in to Office 365 with your work or school account.

  2. In Office 365, select Admin. Or, select the app launcher Office 365 app launcher icon , and then select Admin.

    Office 365 navigation options
  3. Choose Manage your public website.

  4. Choose Change address next to your public website. (If you have two public websites, it just means that you were upgraded from an earlier version of Office 365. Choose the one with the URL that is set to your custom domain.)

  5. In the drop-down list, select the original, your_domain.sharepoint.com domain name, and then select Save.

Wait a little bit for the change to take effect. Now go back to the steps above, and you should be able to edit the A record and the CNAME record. Still doesn’t work? Try posting a question in the Office 365 community forums. They’re a great resource, including Microsoft support agents who can help if you’ve tried the steps here and are still stuck.

Need to do something else with your domain's DNS?

See if one of the following helps:

  • Can't add new DNS entries? Office 365 has a limit of 50 custom DNS entries per domain. If you need to add new entries, please remove old ones and try again.

  • Need to update your MX record? First, make sure that you manage the DNS for your domain, not Office 365. (Not sure what that means? Learn more about DNS management in Office 365.) Then find your domain registrar in the list provided in Create DNS records for Office 365 when you manage your DNS records, and select the registrar name. You'll go to the step-by-step help for creating MX records and other DNS records for Office 365 services.

  • Have additional SPF records you want to add for your domain? If Office 365 manages DNS for your domain, Office 365 can handle spam filtering for you. However, you can, instead, create a TXT record for SPF (spam filtering). You might want to do that, for example, to add your own include clauses for SPF filtering. (To learn more about creating SPF records, see these examples.)

    Another option is to set up your domain so that you manage the domain's DNS yourself at an outside DNS host (such as your domain registrar). Then you can set up the SPF record for the domain at the DNS host where you manage the domain outside Office 365.

  • Want to switch so Office 365 manages DNS for your domain? Or the other way around: switch to managing DNS for your domain yourself, at your domain registrar? To make the change, follow these steps.

  1. Sign in to Office 365 with your work or school account.

  2. Go to the Domains page.

  3. On the Manage domains page, select a domain, and then choose Domain settings.

    On the Manage domains page, choose Manage DNS
  4. Under DNS records, choose New and choose the type of DNS record you want to add.

    Click New and the DNS record type

  5. On the Add a DNS record page, type the information for the new record.

    Type the information for the new DNS record

  6. Choose Save.

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!

×