---
title: "Configure multiple Content Delivery instances"
slug: "configure-multiple-content-delivery-instances"
abstract: "How to configure multiple Sitecore Content Delivery instances."
---
# Configure multiple Content Delivery instances

To configure multiple Content Delivery (CD) instances, do the following for each instance you have installed:

1. Each server must have a unique instance name. By default Sitecore assigns an instance name consisting of the machine name plus the IIS server name.

    If you need to assign a different instance name, use a patch file to set it manually. The following example sets the name to `testCD1`:

    ```xml
    <setting name="InstanceName">
        <patch:attribute name="value">testCD1</patch:attribute>
    </setting>
    ```

    > [!note]
    > You only need to do this if you need to change the default instance name.

2. Ensure that the `Publishing.PublishingInstance` setting in the `\App_Config\Sitecore.config` file is empty - otherwise patch in an empty value:

    ```xml
    <!--  PUBLISHING INSTANCE
        Assigns the instance name of dedicated Sitecore installation
        for publishing operations.
        When empty, all publishing operations are performed on
        the local installation of Sitecore.
        Default vaue: (empty)
    -->
    <setting name="Publishing.PublishingInstance">
        <patch:attribute name="value"></patch:attribute>
    </setting>
    ```

3. If you have activated the [Sitecore IP Geolocation](https://doc.sitecore.com/xp/en/developers/104/sitecore-experience-manager/en/set-up-sitecore-ip-geolocation.html), you must configure each CD instance to perform GeoIP lookups. Use a patch file to set the `Analytics.PerformLookup` property to true in the `\App_Config\Sitecore\Marketing.Tracking\Sitecore.Analytics.Tracking.config` file. This setting must be set to *true* on all the CD instances.

    ```

    <!--  ANALYTICS PERFORM LOOKUP
               Determines if this server performs the lookups (DNS and URLs).
               Should be set to true on every server where Tracking is enabled.
               Default: true
         -->
         <setting name="GeoIp.PerformLookup" value="true" />
    ```

4. Configure a [session state](https://doc.sitecore.com/xp/en/developers/104/platform-administration-and-architecture/scaling-and-configuring-session-state.html "Scaling and configuring session state") server for the CD instances. For each server cluster, configure both private and shared session state and a session state database.
5. In the ASP.NET `web.config` file, set the `validationKey` and the `decryptionKey` attributes of the `[/configuration/system.web/machineKey](https://msdn.microsoft.com/library/ms998288.aspx)` element to a non-auto generated value. Ensure that the value is the same on all the Sitecore instances within the environment and that the `IsolateApps` modifier is not present in either value.

    > [!important]
    > The configured machine key must remain confidential. For guidance on enhancing its security, please refer to [Protect the machine key from unauthorized access](https://support.sitecore.com/kb?id=kb_article_view&sysparm_article=KB1003835).

> [!note]
> In Sitecore 9 and later, the parameter `Analytics.ClusterName` in the `Sitecore.Analytics.Tracking.Config` file is no longer used, and should be left at its default value.

## Configuring load balancing for CD servers

If you have two or more CD servers, you must configure load balancing and [session state management](https://doc.sitecore.com/xp/en/developers/104/platform-administration-and-architecture/scaling-and-configuring-session-state.html "Scaling and configuring session state") for the servers.You are required to use out of process session state management which means you do not need to use a persistent load-balancing method.