Add records at Cloudflare to set up your SharePoint Online Public Website

Note: The SharePoint Online Public Website information in this article applies only if your organization purchased Office 365 prior to March 9, 2015. If you purchased Office 365 after March 9, 2015, use an Office 365 website hosting partner.

Before you rename the site to use your custom domain name, make sure that you've finished designing the website (in Office 365) and that you're ready for everyone to see it. Then, when you're ready to use your custom domain for the address, you create (at the DNS host for your domain) a CNAME record to point to your customized website.

Ready to create that CNAME record at Cloudflare? Follow the steps in this article. (Need more help? Get support.)

Add the CNAME record to use your custom domain

First, review one of the two following linked articles (depending on the Office 365 subscription that you have) for an overview of the process.

Then, when you’re ready to create the required CNAME record, use the steps in the following section.

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


  2. On the Overview page, in the Select Website area, choose the domain that you want to update.


  3. On the Overview page for your domain, choose DNS.


    Important: By default, Cloudflare creates a system record that enables the “www” prefix for your domain. The presence of this A Record prevents you from creating the CNAME Record required for redirecting your website to SharePoint. To create the required CNAME Record, you must first deactivate the A Record associated with your www.domain_name.

  4. Delete the “www” A Record for Your Domain

    On the DNS Records page, delete the A Record that maps to the www value in the Name column, by choosing the X (delete) control.


  5. On the Confirm screen, choose OK.


    Important: We recommend that you copy and save all the Record information on this page in an archive document or screenshot. This ensures that you will be able to re-create the required A Record if you make configuration changes in the future.

  6. Add the Required CNAME Record

    On the DNS Records page, in the boxes for the new record, type or copy and paste the values from the following table.

    (Select the DNS Record Type value from the drop-down list.)



    Domain name


    Where domain_name is the name of your custom domain (for example,


    name is the name of your custom domain (for example,


  7. Choose Add Record.


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

Set up redirection so that people can get to your public website if they don’t type www

Cloudflare does not support DNS Redirects (see their statement below). You instead need to use Cloudflare’s page rules. We do not recommend using this approach unless you have advanced experience with page forwarding rules and implementations.

For more information about redirection, see Make sure people can get to your Office 365 public website if they don’t type www.


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!