---
schema_version: "1"
id: 42fd03524941afa7d0e7b67874811c033186b6762181a3074977fcd52283d918
title: MyDomainSettings
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/api_meta/meta_mydomainsettings.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_mydomainsettings.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 9474780ede5d5cd77964baa27d59faa393871e846b88e56815cb10e36c98051c
description: Represents your org’s My Domain settings. With My Domain, you can include your company name in your URLs, for example, https://yourcompanyname.my.salesforce.com. This type extends the Metadata metadata type and inherits its fullName field.
---
# MyDomainSettings

Represents your org’s My Domain settings. With My Domain, you can include your company name in your URLs, for example, https://yourcompanyname.my.salesforce.com. This type extends the Metadata metadata type and inherits its fullName field.

## File Suffix and Directory Location

MyDomainSettings values are stored in a single file named MyDomain.settings in the settings directory. The .settings files are different from other named components because there’s only one settings file for each settings component.

## Version

MyDomainSettings components are available in API version 47.0 and later.

## Fields

<table class="featureTable sort_table" summary="">



          <thead class="thead sorted" align="left">
            <tr>
              <th class="featureTableHeader  " id="d681709e93">Field Name</th>

              <th class="featureTableHeader  " id="d681709e96">Field Type</th>

              <th class="featureTableHeader  " id="d681709e99">Description</th>

            </tr>

          </thead>

          <tbody class="tbody">
            <tr>
              <td class="entry" headers="d681709e93" data-title="Field Name"><span class="keyword parmname">areLegacyRedirectsMaintained</span></td>

              <td class="entry" headers="d681709e96" data-title="Field Type">boolean</td>

              <td class="entry" headers="d681709e99" data-title="Description">Salesforce checks this field when this org is upgraded to Summer ’25. If
                <span class="keyword parmname">areLegacyRedirectsMaintained</span> is <samp class="codeph nolang">false</samp>, Salesforce disables <span class="keyword parmname">enableLegacyRedirections</span>
                during the upgrade. If <samp class="codeph nolang">true</samp>, no change is made
                to <span class="keyword parmname">enableLegacyRedirections</span> during the upgrade. The default is
                <samp class="codeph nolang">false</samp>.<p class="p">This field has no impact after this
                  org is on Summer ’25.</p>
                <p class="p">Available in API version 63.0 and later.</p>
              </td>

            </tr>

            <tr>
              <td class="entry" headers="d681709e93" data-title="Field Name"><span class="keyword parmname">areLgcyRdirMaintainedWntr26</span></td>

              <td class="entry" headers="d681709e96" data-title="Field Type">boolean</td>

              <td class="entry" headers="d681709e99" data-title="Description">Salesforce checks this field when this org is upgraded to Winter ’26. If
                <span class="keyword parmname">areLgcyRdirMaintainedWntr26</span> is <samp class="codeph nolang">false</samp>, Salesforce disables <span class="keyword parmname">enableLegacyRedirections</span>
                during the upgrade. If <samp class="codeph nolang">true</samp>, no change is made
                to <span class="keyword parmname">enableLegacyRedirections</span> during the upgrade. The default is
                <samp class="codeph nolang">false</samp>.<p class="p">This field has no impact after this
                  org is on Winter ’26.</p>
                <p class="p">Available in API version 64.0 and later.</p>
              </td>

            </tr>

            <tr>
              <td class="entry" headers="d681709e93" data-title="Field Name"><span class="keyword parmname">canOnlyLoginWithMyDomainUrl</span></td>

              <td class="entry" headers="d681709e96" data-title="Field Type">boolean</td>

              <td class="entry" headers="d681709e99" data-title="Description">If <samp class="codeph nolang">true</samp>, users must use the org's My
                Domain login URL to log in. If <samp class="codeph nolang">false</samp> (default),
                users can also log in using the org’s instance Salesforce URL,
                <span class="ph filepath">https://<var class="keyword varname">InstanceName</var>.salesforce.com</span>, and
                through the login URL <span class="ph filepath">https://login.salesforce.com</span>.<p class="p">Admins
                  can log in to a sandbox via the <strong class="ph uicontrol">Log In</strong> action on the
                  Sandboxes Setup page only when <span class="keyword parmname">canOnlyLoginWithMyDomainUrl</span> is
                  <samp class="codeph nolang">false</samp> in the sandbox.
                </p>
              </td>

            </tr>

            <tr>
              <td class="entry" headers="d681709e93" data-title="Field Name"><span class="keyword parmname">doesApiLoginRequireOrgDomain</span></td>

              <td class="entry" headers="d681709e96" data-title="Field Type">boolean</td>

              <td class="entry" headers="d681709e99" data-title="Description">If <samp class="codeph nolang">true</samp>, users must use the org’s My
                Domain login URL to access the Salesforce API. If <samp class="codeph nolang">false</samp> (default), users can also access the Salesforce API using the
                generic Salesforce page,
                <span class="ph filepath">https://<var class="keyword varname">InstanceName</var>.salesforce.com</span> and
                through the login URL <span class="ph filepath">https://login.salesforce.com</span>.
              </td>

            </tr>

            <tr>
              <td class="entry" headers="d681709e93" data-title="Field Name"><span class="keyword parmname">doesWarnOnForceComRedirect</span></td>

              <td class="entry" headers="d681709e96" data-title="Field Type">boolean</td>

              <td class="entry" headers="d681709e99" data-title="Description">Indicates whether users who visit a previous *.force.com site URL for this org
                see a message with the current URL during redirections (<samp class="codeph nolang">true</samp>) or not (<samp class="codeph nolang">false</samp>). The default
                is <samp class="codeph nolang">false</samp>.<p class="p">This field is applicable only
                  when</p>
                <ul class="ul bulletList">
                  <li class="li">Your org has a previous *.force.com URL associated with an Experience Cloud
                    site or Salesforce Site.</li>

                  <li class="li">
                    <span class="keyword parmname">redirectForceComSiteUrls</span> is <samp class="codeph nolang">true</samp>
                  </li>

                </ul>
                <p class="p">This field is available in API version 59.0 and later.</p>
              </td>

            </tr>

            <tr>
              <td class="entry" headers="d681709e93" data-title="Field Name"><span class="keyword parmname">doesWarnOnRedirect</span></td>

              <td class="entry" headers="d681709e96" data-title="Field Type">boolean</td>

              <td class="entry" headers="d681709e99" data-title="Description">Indicates whether users who visit a previous My Domain URL see a message with
                the current URL during redirections (<samp class="codeph nolang">true</samp>) or
                not (<samp class="codeph nolang">false</samp>). The default is <samp class="codeph nolang">false</samp>.<p class="p">This field is applicable only when</p>
                <ul class="ul bulletList">
                  <li class="li">Your org has a previous My Domain. For example, after an admin deploys a
                    change to the My Domain.</li>

                  <li class="li">The previous My Domain hasn’t been removed via the Routing options on the My
                    Domain Setup page. If the previous My Domain is removed, calls to URLs
                    associated with that My Domain aren’t redirected.</li>

                  <li class="li">
                    <span class="keyword parmname"><span class="keyword parmname">redirectPriorMyDomain</span></span> is <samp class="codeph nolang">true</samp>.
                  </li>

                </ul>
                <p class="p">This field is available in API version 59.0 and later.</p>
              </td>

            </tr>

            <tr>
              <td class="entry" headers="d681709e93" data-title="Field Name"><span class="keyword parmname">domainPartition</span></td>

              <td class="entry" headers="d681709e96" data-title="Field Type">OrgDomainShard (enumeration of type string)</td>

              <td class="entry" headers="d681709e99" data-title="Description">The partition for this org. When <samp class="codeph nolang">none</samp>,
                partitioned domains aren’t enabled. Otherwise, My Domain hostnames include the
                partition value. For example, the format of a My Domain login hostname for a
                Developer Edition org with partitioned domains is
                <span class="ph filepath"><var class="keyword varname">MyDomainName</var>.develop.my.salesforce.com</span>.<p class="p">This
                  field is read-only in the API. Possible values are: </p>
                <ul class="ul bulletList">
                  <li class="li">
                    <samp class="codeph nolang">demo</samp>—Used in demo orgs. Available
                    in API version 60.0 and later.
                  </li>

                  <li class="li">
                    <samp class="codeph nolang">develop</samp>—Used in Developer Edition
                    orgs. Also used in patch orgs where partitioned domains were deployed before
                    Winter ’24.
                  </li>

                  <li class="li">
                    <samp class="codeph nolang">free</samp>—Reserved for internal
                    use.
                  </li>

                  <li class="li">
                    <samp class="codeph nolang">none</samp>—Indicates that this org
                    doesn’t use partitioned domains.
                  </li>

                  <li class="li">
                    <samp class="codeph nolang">patch</samp>—Used in patch orgs.
                    Available in API version 59.0 and later.
                  </li>

                  <li class="li">
                    <samp class="codeph nolang">sandbox</samp>—Used in sandboxes with
                    enhanced domains. These orgs are always partitioned.
                  </li>

                  <li class="li">
                    <samp class="codeph nolang">scratch</samp>—Used in scratch orgs.
                  </li>

                  <li class="li">
                    <samp class="codeph nolang">sfdctest</samp>—Reserved for internal
                    use.
                  </li>

                  <li class="li">
                    <samp class="codeph nolang">trailblaze</samp>—Used in Trailblazer
                    Playgrounds.
                  </li>

                </ul>
                <p class="p">Partitioned domains require enhanced domains.
                  Production
                  orgs always have a value of <samp class="codeph nolang">none</samp>, and only
                  the sandbox partition is available in Government Cloud—Defense
                  orgs.</p>
                <p class="p">Qualifying new orgs are partitioned by default and get the
                  corresponding <span class="keyword parmname">domainPartition</span> value. You can’t disable this
                  feature in those orgs.</p>
                <p class="p">Available in API version 55.0 and later.</p>
              </td>

            </tr>

            <tr>
              <td class="entry" headers="d681709e93" data-title="Field Name"><span class="keyword parmname">edgeRoutingMethod</span></td>

              <td class="entry" headers="d681709e96" data-title="Field Type">edgeRoutingOption (enumeration of type string)</td>

              <td class="entry" headers="d681709e99" data-title="Description">If <span class="keyword parmname">useEdge</span> is <samp class="codeph nolang">true</samp>,
                the routing method for traffic for requests to this org. If
                <span class="keyword parmname">useEdge</span> is <samp class="codeph nolang">false</samp>, this
                field has no effect. The default is <samp class="codeph nolang">global</samp>.<p class="p">Possible values are:</p>
                <ul class="ul bulletList">
                  <li class="li">
                    <samp class="codeph nolang">global</samp>—Route requests to the
                    Salesforce Edge Network location closest to the origin of the request. This
                    method provides the best performance and security.
                  </li>

                  <li class="li">
                    <p class="p"><samp class="codeph nolang">regional</samp>—Route requests to
                      Salesforce locations only in the country where your org is located. </p>

                    <p class="p">This routing method is only available in orgs on a Hyperforce instance in
                      Japan.</p>

                    <p class="p">This routing method can result in increased round-trip time for requests,
                      especially for users located outside of your country.</p>

                  </li>

                  <li class="li">
                    <samp class="codeph nolang">gsr</samp>— Route requests to the nearest
                    reliable network node while bypassing specific network locations in the Middle
                    East where your users face connectivity issues due to firewall blockages.
                  </li>

                </ul>
                <p class="p">This field is read-only in the API. Update this setting on the My Domain
                  Setup page.</p>
                <p class="p">Available in API version 65.0 and later.</p>
              </td>

            </tr>

            <tr>
              <td class="entry" headers="d681709e93" data-title="Field Name"><span class="keyword parmname">enableCrossDomainPreviewCookies</span></td>

              <td class="entry" headers="d681709e96" data-title="Field Type">boolean</td>

              <td class="entry" headers="d681709e99" data-title="Description">If <span class="keyword parmname">﻿isFirstPartyCookieUseRequired</span> is <samp class="codeph nolang">true</samp>, indicates whether cross-domain cookies are
                allowed on the Experience Builder preview domain (<samp class="codeph nolang">true</samp>) or not (<samp class="codeph nolang">false</samp>).<p class="p">If
                  <span class="keyword parmname">﻿isFirstPartyCookieUseRequired</span> is <samp class="codeph nolang">false</samp>, this field has no effect.
                </p>
                <p class="p">Available in
                  API version 62.0 and later.</p>
              </td>

            </tr>

            <tr>
              <td class="entry" headers="d681709e93" data-title="Field Name"><span class="keyword parmname">enableEdgeDuringRollout</span></td>

              <td class="entry" headers="d681709e96" data-title="Field Type">boolean</td>

              <td class="entry" headers="d681709e99" data-title="Description">Indicates whether Salesforce Edge Network is enabled in this org during the
                scheduled rollout. If <samp class="codeph nolang">true</samp>, Salesforce notifies
                admins by email before Salesforce Edge Network is enabled. If <samp class="codeph nolang">false</samp>, the Edge enablement is deferred. The default
                value is <samp class="codeph nolang">true</samp>. <p class="p">If
                  <span class="keyword parmname">useEdge</span> is <samp class="codeph nolang">true</samp>, this
                  field has no effect.
                </p>
                <p class="p">Available in API version 58.0 and later.</p>
              </td>

            </tr>

            <tr>
              <td class="entry" headers="d681709e93" data-title="Field Name"><span class="keyword parmname">enableExtendedRedirections</span></td>

              <td class="entry" headers="d681709e96" data-title="Field Type">boolean</td>

              <td class="entry" headers="d681709e99" data-title="Description">If Salesforce configured temporary extended redirections for select legacy
                hostnames for this org, indicates whether calls to those hostnames are redirected
                (<samp class="codeph nolang">true</samp>) or not (<samp class="codeph nolang">false</samp>). The default is <samp class="codeph nolang">true</samp>. If
                extended redirections aren’t configured for this org, this field has no
                effect.<p class="p">Available in API version 62.0 and later.</p>
              </td>

            </tr>

            <tr>
              <td class="entry" headers="d681709e93" data-title="Field Name"><span class="keyword parmname">enableLegacyRedirections</span></td>

              <td class="entry" headers="d681709e96" data-title="Field Type">boolean</td>

              <td class="entry" headers="d681709e99" data-title="Description">If <span class="keyword parmname">redirectPriorMyDomain</span> is <samp class="codeph nolang">true</samp>, indicates whether legacy hostnames for this org are redirected
                (<samp class="codeph nolang">true</samp>) or not (<samp class="codeph nolang">false</samp>).<p class="p">If any of these conditions are true, this field has no
                  effect.</p>
                <ul class="ul bulletList">
                  <li class="li">No legacy (non-enhanced) hostnames exist for the org</li>

                  <li class="li">
                    <span class="keyword parmname">redirectPriorMyDomain</span> is <samp class="codeph nolang">false</samp>
                  </li>

                  <li class="li">Salesforce stopped legacy redirections for this org</li>

                </ul>
                <p class="p">For more information about the end of legacy hostname redirections, see
                  <a class="xref" href="https://help.salesforce.com/s/articleView?id=products.domain_name_redirections_non_enhanced.htm&amp;type=5&amp;language=en_US" target="_blank">Prepare for the End of Redirections for
                    Non-Enhanced Domains</a> in Salesforce Help.
                </p>
                <p class="p">Available in API version
                  62.0 and later.</p>
              </td>

            </tr>

            <tr>
              <td class="entry" headers="d681709e93" data-title="Field Name"><span class="keyword parmname">enableNativeBrowserForAuthOnAndroid</span></td>

              <td class="entry" headers="d681709e96" data-title="Field Type">boolean</td>

              <td class="entry" headers="d681709e99" data-title="Description">If <samp class="codeph nolang">true</samp>, use the native browser for
                authentication of Android mobile apps. Default is <samp class="codeph nolang">false</samp>.</td>

            </tr>

            <tr>
              <td class="entry" headers="d681709e93" data-title="Field Name"><span class="keyword parmname">enableNativeBrowserForAuthOnIos</span></td>

              <td class="entry" headers="d681709e96" data-title="Field Type">boolean</td>

              <td class="entry" headers="d681709e99" data-title="Description">If <samp class="codeph nolang">true</samp>, use the native browser for
                authentication of iOS mobile apps. Default is <samp class="codeph nolang">false</samp>.</td>

            </tr>

            <tr>
              <td class="entry" headers="d681709e93" data-title="Field Name"><span class="keyword parmname">instancedUrlRedirectHandling</span></td>

              <td class="entry" headers="d681709e96" data-title="Field Type">OrgDomainRedirectOption (enumeration of type string)</td>

              <td class="entry" headers="d681709e99" data-title="Description">Indicates how user visits to this org’s instanced URL are handled.<p class="p">Possible
                  values are:</p>
                <ul class="ul bulletList">
                  <li class="li">
                    <samp class="codeph nolang">Redirect</samp>—Redirect users to the
                    equivalent page on this org’s My Domain hostnames.
                  </li>

                  <li class="li">
                    <samp class="codeph nolang">WarnOnRedirect</samp>—Display a brief
                    warning message to users as they are redirected to the equivalent page on this
                    org’s My Domain hostnames.
                  </li>

                  <li class="li">
                    <samp class="codeph nolang">NoRedirect</samp>—Require users to use
                    your My Domain hostnames when they view this org’s pages. Visits to this page’s
                    instanced URL aren’t redirected.
                  </li>

                </ul>
                <p class="p">For example, when a user visits <samp class="codeph nolang">https://<var class="keyword varname">InstanceName</var>.lightning.force.com/lightning/page/home</samp>,
                  this setting determines whether they’re redirected to <samp class="codeph nolang">https://<var class="keyword varname">MyDomainName</var>.lightning.force.com/lightning/page/home</samp>.</p>
                <p class="p">The
                  value of this field has no effect on user’s ability to log in via the org’s
                  instanced URL. To control that behavior, use
                  <span class="keyword parmname">canOnlyLoginWithMyDomainUrl</span>.
                </p>
                <p class="p">Available in API version
                  59.0 and later.</p>
              </td>

            </tr>

            <tr>
              <td class="entry" headers="d681709e93" data-title="Field Name"><span class="keyword parmname">﻿isFirstPartyCookieUseRequired</span></td>

              <td class="entry" headers="d681709e96" data-title="Field Type">boolean</td>

              <td class="entry" headers="d681709e99" data-title="Description">Indicates whether the <samp class="codeph nolang">SameSite=None</samp>
                attribute is removed from Salesforce cookies (<samp class="codeph nolang">true</samp>) or not (<samp class="codeph nolang">false</samp>). In Salesforce
                orgs created in Summer ’24 and later, the default is <samp class="codeph nolang">true</samp>. In all other orgs, the default is <samp class="codeph nolang">false</samp>.<p class="p">Service Cloud Voice with Amazon Connect and Service Cloud Voice
                  with Partner Telephony from Amazon Connect aren’t compatible with this setting. If
                  you use those features, set <span class="keyword parmname">﻿isFirstPartyCookieUseRequired</span> to
                  <samp class="codeph nolang">false</samp>. <a class="xref" href="https://help.salesforce.com/s/articleView?id=004333227&amp;type=1&amp;language=en_US" target="_blank"><u class="ph u">Learn more</u></a>.
                </p>
                <p class="p">Available in API
                  version 61.0 and later.</p>
              </td>

            </tr>

            <tr>
              <td class="entry" headers="d681709e93" data-title="Field Name"><span class="keyword parmname">isIcorInstApiTrafficBlocked</span></td>

              <td class="entry" headers="d681709e96" data-title="Field Type">boolean</td>

              <td class="entry" headers="d681709e99" data-title="Description">This field is reserved for future use. The default is <samp class="codeph nolang">false</samp>.<p class="p">Available in API version 64.0 and
                  later.</p>
              </td>

            </tr>

            <tr>
              <td class="entry" headers="d681709e93" data-title="Field Name"><span class="keyword parmname">logRedirections</span></td>

              <td class="entry" headers="d681709e96" data-title="Field Type">boolean</td>

              <td class="entry" headers="d681709e99" data-title="Description">If <samp class="codeph nolang">true</samp>, Salesforce produces a log for the
                Hostname Redirects event type when daily event logs are generated. The default is
                <samp class="codeph nolang">false</samp>. <p class="p">The Hostname Redirects event is
                  free for all customers with a 24-hour data retention period. When
                  <span class="keyword parmname">logRedirections</span> is <samp class="codeph nolang">true</samp>, this event is available in the API but not in the Event
                  Monitoring Analytics app. You can also download the latest Hostname Redirects
                  event log file through a button on the My Domain page.
                </p>
                <p class="p">Available in API
                  version 56.0 and later.</p>
              </td>

            </tr>

            <tr>
              <td class="entry" headers="d681709e93" data-title="Field Name"><span class="keyword parmname" id="myDomainName"><a name="myDomainName"><!-- --></a>myDomainName</span></td>

              <td class="entry" headers="d681709e96" data-title="Field Type">string</td>

              <td class="entry" headers="d681709e99" data-title="Description">The subdomain name used in My Domain URLs for this org, such as <samp class="codeph nolang"><span class="keyword parmname">MyDomainName</span>.my.salesforce.com</samp>
                and <samp class="codeph nolang"><span class="keyword parmname">MyDomainName</span>.lightning.force.com</samp>.<p class="p">This field is
                  read-only in the API. You can change your org’s My Domain name from the My Domain
                  Setup page.</p>
                <p class="p">Available in API version 51.0 and later.</p>
              </td>

            </tr>

            <tr>
              <td class="entry" headers="d681709e93" data-title="Field Name"><span class="keyword parmname" id="myDomainSuffix"><a name="myDomainSuffix"><!-- --></a>myDomainSuffix</span></td>

              <td class="entry" headers="d681709e96" data-title="Field Type">OrgDomainProdSuffix (enumeration of type string)</td>

              <td class="entry" headers="d681709e99" data-title="Description">The domain suffix for this org’s My Domain login URL. This field is read-only
                in the API.<p class="p">Possible values are: </p>
                <ul class="ul bulletList">
                  <li class="li">
                    <samp class="codeph nolang" id="CloudforceSuffix"><a name="CloudforceSuffix"><!-- --></a>CloudforceLimited</samp>—<span class="ph filepath">cloudforce.com</span>
                  </li>

                  <li class="li">
                    <samp class="codeph nolang" id="DatabaseSuffix"><a name="DatabaseSuffix"><!-- --></a>DatabaseLimited</samp>—<span class="ph filepath">database.com</span>
                  </li>

                  <li class="li">
                    <samp class="codeph nolang">MySalesforce</samp>—<span class="ph filepath">my.salesforce.com</span> with
                    enhanced domains
                  </li>

                  <li class="li">
                    <samp class="codeph nolang" id="StandardSuffix"><a name="StandardSuffix"><!-- --></a>MySalesforceLimited</samp>—<span class="ph filepath">my.salesforce.com</span>
                    without enhanced domains
                  </li>

                  <li class="li">
                    <samp class="codeph nolang">OrgLevelCertificate</samp>—<span class="ph filepath">my-salesforce.com</span>
                  </li>

                  <li class="li">
                    <samp class="codeph nolang">OrgLevelCertificateLimited</samp>—legacy
                    version of <span class="ph filepath">my-salesforce.com</span> that’s noncompliant with
                    browser settings that block third-party cookies
                  </li>

                  <li class="li">
                    <samp class="codeph nolang">Restricted1</samp>—Reserved for future
                    use.
                  </li>

                  <li class="li">
                    <samp class="codeph nolang">Restricted2</samp>—Reserved for future
                    use.
                  </li>

                </ul>
                <p class="p">Available in API version 51.0 and later.</p>
              </td>

            </tr>

            <tr>
              <td class="entry" headers="d681709e93" data-title="Field Name"><span class="keyword parmname">onboardCustomerSpecificSuffix</span></td>

              <td class="entry" headers="d681709e96" data-title="Field Type">boolean</td>

              <td class="entry" headers="d681709e99" data-title="Description">This field is reserved for future use. The default is <samp class="codeph nolang">false</samp>.<p class="p">Available in API version 63.0 and
                  later.</p>
              </td>

            </tr>

            <tr>
              <td class="entry" headers="d681709e93" data-title="Field Name"><span class="keyword parmname">redirectForceComSiteUrls</span></td>

              <td class="entry" headers="d681709e96" data-title="Field Type">boolean</td>

              <td class="entry" headers="d681709e99" data-title="Description">If <samp class="codeph nolang">true</samp>, calls to URLs ending in
                <span class="ph filepath">.force.com</span> that serve your Experience Cloud sites and
                Salesforce Sites are redirected to the corresponding current My Domain site URL. If
                <samp class="codeph nolang">false</samp>, these calls aren’t redirected and the
                user gets a file not found (404) error. The default is <samp class="codeph nolang">true</samp>.<p class="p">This field is only applicable when</p>
                <ul class="ul bulletList">
                  <li class="li">Enhanced domains are enabled.</li>

                  <li class="li">Your org has a previous *.force.com URL associated with an Experience Cloud
                    site or Salesforce Site.</li>

                </ul>
                <p class="p">Available in API version 55.0 and later.</p>
              </td>

            </tr>

            <tr>
              <td class="entry" headers="d681709e93" data-title="Field Name"><span class="keyword parmname">redirectPriorMyDomain</span></td>

              <td class="entry" headers="d681709e96" data-title="Field Type">boolean</td>

              <td class="entry" headers="d681709e99" data-title="Description">If <samp class="codeph nolang">true</samp>, calls to URLs associated with
                your previous My Domain name are redirected to the corresponding URL associated with
                your current My Domain. If <samp class="codeph nolang">false</samp>, these calls
                aren’t redirected. When you deploy a new My Domain, this setting resets to its
                default, <samp class="codeph nolang">true</samp>.<p class="p">This field is only applicable
                  when</p>
                <ul class="ul bulletList">
                  <li class="li">Your org has a previous My Domain. For example, after an admin deploys a
                    change to the My Domain.</li>

                  <li class="li">The previous My Domain hasn’t been removed via the Routing options on the My
                    Domain Setup page. If the previous My Domain is removed, calls to URLs
                    associated with that My Domain aren’t redirected.</li>

                </ul>
                <p class="p">Available in API version 54.0 and later.</p>
              </td>

            </tr>

            <tr>
              <td class="entry" headers="d681709e93" data-title="Field Name"><span class="keyword parmname">use3rdPartyCookieBlockingCompatibleHostnames</span></td>

              <td class="entry" headers="d681709e96" data-title="Field Type">boolean</td>

              <td class="entry" headers="d681709e99" data-title="Description">Indicates whether the org’s instance name is included in Visualforce URLs when
                third-party cookies are blocked (<samp class="codeph nolang">true</samp>) or not
                (<samp class="codeph nolang">false</samp>). This field has a default value of
                <samp class="codeph nolang">true</samp>. Setting this field <samp class="codeph nolang">true</samp> prevents potential issues loading Visualforce
                pages with stabilized URLs.<p class="p">Only applicable when DatabaseLimiteduseStabilizedMyDomainHostnames<samp class="codeph nolang"> is set to
                    true</samp> and myDomainSuffix is set to </p>
                <p class="p">Available in API version
                  51.0 and later.</p>
              </td>

            </tr>

            <tr>
              <td class="entry" headers="d681709e93" data-title="Field Name"><span class="keyword parmname">useEdge</span></td>

              <td class="entry" headers="d681709e96" data-title="Field Type">boolean</td>

              <td class="entry" headers="d681709e99" data-title="Description">
                <p class="p">Indicates whether this org’s qualifying My Domain URLs are routed through
                  Salesforce Edge Network (<samp class="codeph nolang">true</samp>) or not
                  (<samp class="codeph nolang">false</samp>). This field has a default value of
                  <samp class="codeph nolang">true</samp>.
                </p>

                <p class="p">This field is read-only in the API. If your org can use Salesforce Edge Network,
                  you can enable this setting from the My Domain Setup page. After this field is set
                  to <samp class="codeph nolang">true</samp> from Setup, it can't be set to
                  <samp class="codeph nolang">false</samp>.
                </p>

                <p class="p">Available in API version 51.0 and later.</p>

              </td>

            </tr>

            <tr>
              <td class="entry" headers="d681709e93" data-title="Field Name"><span class="keyword parmname">useEnhancedDomainsInSandbox</span></td>

              <td class="entry" headers="d681709e96" data-title="Field Type">boolean</td>

              <td class="entry" headers="d681709e99" data-title="Description">This field corresponds to the previous My Domain setting, Use enhanced domains
                by default in new and refreshed sandboxes, that was removed in Summer
                ’23.<p class="p">Previously, in API versions 55.0 to 57.0, if enhanced domains weren’t
                  enabled, this field indicated whether new and refreshed sandboxes created from
                  this org used enhanced domains by default (<samp class="codeph nolang">true</samp>) or not (<samp class="codeph nolang">false</samp>), and the
                  default value was <samp class="codeph nolang">true</samp>. As of API version
                  58.0, this field’s value is always <samp class="codeph nolang">true</samp>,
                  regardless of the value that you set. Changing its value has no effect on
                  Salesforce, even if it reads <samp class="codeph nolang">false</samp>.</p>
              </td>

            </tr>

            <tr>
              <td class="entry" headers="d681709e93" data-title="Field Name"><span class="keyword parmname" id="useStabilizedMyDomainHostnames"><a name="useStabilizedMyDomainHostnames"><!-- --></a>useStabilizedMyDomainHostnames</span></td>

              <td class="entry" headers="d681709e96" data-title="Field Type">boolean</td>

              <td class="entry" headers="d681709e99" data-title="Description">Indicates whether the instance name is hidden in My Domain URLs for
                Visualforce, Experience Builder, Site.com Studio, and content files (<samp class="codeph nolang">true</samp>) or not (<samp class="codeph nolang">false</samp>). This field has a default value of <samp class="codeph nolang">true</samp>. For example,
                <span class="ph filepath"><var class="keyword varname">MyDomainName</var>--<var class="keyword varname">PackageName</var>.na44.visual.force.com</span>
                becomes
                <span class="ph filepath"><var class="keyword varname">MyDomainName</var>--<var class="keyword varname">PackageName</var>.visualforce.com</span>
                when this field is set to <samp class="codeph nolang">true</samp>.<p class="p">Only
                  applicable when DatabaseLimitedmyDomainSuffix is set
                  to </p>
              </td>

            </tr>

            <tr>
              <td class="entry" headers="d681709e93" data-title="Field Name"><span class="keyword parmname">useStabilizedSandboxMyDomainHostnames</span></td>

              <td class="entry" headers="d681709e96" data-title="Field Type">boolean</td>

              <td class="entry" headers="d681709e99" data-title="Description">This field corresponds to the Stabilize the Hostname for My Domain URLs in
                Sandboxes release update, which was enforced in Summer ’20.<p class="p">When <samp class="codeph nolang">true</samp>, the instance name is hidden in My Domain URLs
                  for sandboxes orgs. For example,
                  <span class="ph filepath"><var class="keyword varname">MyDomainName</var>--test.cs5.my.salesforce.com</span>
                  became
                  <span class="ph filepath"><var class="keyword varname">MyDomainName</var>--test.my.salesforce.com</span>. As
                  of API version 49.0, this field's value is always <samp class="codeph nolang">true</samp>, regardless of the value that you set. Changing its value has no
                  effect on Salesforce, even if it reads <samp class="codeph nolang">false</samp>.
                </p>
                <p class="p">This change applies retroactively back to API version 47.0, when this field
                  was first introduced. Previously, in API version 47.0 to 49.0, this field
                  indicated whether the instance name was hidden in My Domain URLs for sandboxes
                  orgs (<samp class="codeph nolang">true</samp>) or not (<samp class="codeph nolang">false</samp>), and the field's default value was <samp class="codeph nolang">false</samp>. Now, in all API versions, this field's value
                  is always <samp class="codeph nolang">true</samp>, even if it reads <samp class="codeph nolang">false</samp>.</p>
              </td>

            </tr>

          </tbody>

        </table>

## Declarative Metadata Sample Definition

The following is an example of a MyDomainSettings component.

<?xml version="1.0" encoding="UTF-8"?>
<MyDomainSettings xmlns="http://soap.sforce.com/2006/04/metadata">
    <areLegacyRedirectsMaintained\>false</areLegacyRedirectsMaintained\>
    <areLgcyRdirMaintainedWntr26\>false</areLgcyRdirMaintainedWntr26\>
    <canOnlyLoginWithMyDomainUrl\>false</canOnlyLoginWithMyDomainUrl\>
    <doesApiLoginRequireOrgDomain\>false</doesApiLoginRequireOrgDomain\>
    <doesWarnOnForceComRedirect\>false</doesWarnOnForceComRedirect\>
    <doesWarnOnRedirect\>true</doesWarnOnRedirect\>
    <domainPartition\>none</domainPartition\>
    <edgeRoutingMethod\>global</edgeRoutingMethod\>
    <enableCrossDomainPreviewCookies\>true</enableCrossDomainPreviewCookies\>
    <enableEdgeDuringRollout\>true</enableEdgeDuringRollout\>
    <enableExtendedRedirections\>false</enableExtendedRedirections\>
    <enableLegacyRedirections\>false</enableLegacyRedirections\>
    <enableNativeBrowserForAuthOnAndroid\>false</enableNativeBrowserForAuthOnAndroid\>
    <enableNativeBrowserForAuthOnIos\>false</enableNativeBrowserForAuthOnIos\>
    <instancedUrlRedirectHandling\>false</instancedUrlRedirectHandling\>
    <﻿isFirstPartyCookieUseRequired>true</﻿isFirstPartyCookieUseRequired>
    <isIcorInstApiTrafficBlocked\>true</isIcorInstApiTrafficBlocked\>
    <logRedirections\>true</logRedirections\>
    <myDomainName\>mycompany</myDomainName\>
    <myDomainSuffix\>MySalesforce</myDomainSuffix\>
    <onboardCustomerSpecificSuffix\>false</onboardCustomerSpecificSuffix\>
    <redirectForceComSiteUrls\>true</redirectForceComSiteUrls\>
    <redirectPriorMyDomain\>true</redirectPriorMyDomain\>
    <use3rdPartyCookieBlockingCompatibleHostnames\>true</use3rdPartyCookieBlockingCompatibleHostnames\>
    <useEdge\>true</useEdge\>
    <useEnhancedDomainsInSandbox\>true</useEnhancedDomainsInSandbox\>
    <useStabilizedMyDomainHostnames\>true</useStabilizedMyDomainHostnames\>
    <useStabilizedSandboxMyDomainHostnames\>true</useStabilizedSandboxMyDomainHostnames\>
</MyDomainSettings\>

The following is an example package.xml that references the previous definition.

<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
    <types\>
        <members\>MyDomain</members\>
        <name\>Settings</name\>
    </types\>
    <version\>65.0</version\>
</Package\>