---
schema_version: "1"
id: 8c6c470ca3277e8f794b38b663d7c47164e35301445c4cda20f24025f80167d8
title: Create and Edit Custom Headers
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/xcloud/264-0-0/nc_create_custom_headers.md
canonical_url: https://help.salesforce.com/s/articleView?id=xcloud.nc_create_custom_headers.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 8491895b4c217c2e55f5c5e99df9487f76f1086cd2e259b166816f172c36c6c1
description: Use custom headers to make unique secure connections to external data sources.
products:
  - Security
release: "264"
---
# Create and Edit Custom Headers

Use custom headers to make unique secure connections to external data sources.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: both Salesforce Classic (not available in all orgs) and Lightning Experience</td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: all editions</td></tr></tbody></table>

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small permission">
        <colgroup>
          <col style="width:50%">
          <col style="width:50%">
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="colgroup" class="slds-cell-wrap" colspan="2" style="text-align:center;vertical-align:top;" id="d87675e41">User Permissions
              Needed</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d87675e41 ">To view named credentials:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d87675e41 ">View Setup and Configuration</td>

          </tr>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d87675e41 ">To create, edit, or delete named credentials:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d87675e41 ">Manage Named Credentials or Customize Applications</td>

          </tr>
        </tbody>
      </table>

Before you create custom headers, note the following.

- You can use custom headers in named credentials and external credentials. If you create custom headers for both, a single callout combines them.
- Headers are sorted by source and sequence number. Headers from named credentials are placed before headers from external credentials.
- Headers from named credentials overwrite headers from external credentials if the names duplicate.
- Headers are allowed to have duplicate header names if they’re from the same source.

To create custom headers:

1. From [Setup](https://help.salesforce.com/s/articleView?id=xcloud.basics_nav_setup.htm&type=5&language=en_US), use the Quick Find box to find and select **Named Credentials**.
2. Click either **Named Credentials** or **External Credentials**.
3. If you’re creating a custom header, click **New**. If you’re editing an existing custom header, select **Edit** from the Actions menu dropdown for that header.
4. Fill in the fields for the custom header.
    
    <table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small ">
            <colgroup>
              <col style="width:25%">
              <col style="width:75%">
            </colgroup>
            <thead class="slds-text-title_caps ">
              <tr class="">
                <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d87675e121">Field</th>
                <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d87675e123">Description</th>
              </tr>
            </thead>
            <tbody>
              <tr class="">
                <td data-label="Field" class="slds-cell-wrap" style="vertical-align:top;" headers="d87675e121 "><strong class="uicontrol">Name</strong></td>
                <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d87675e123 ">The name of the custom header for this credential.</td>
              </tr>
              <tr class="">
                <td data-label="Field" class="slds-cell-wrap" style="vertical-align:top;" headers="d87675e121 "><strong class="uicontrol">Value</strong></td>
                <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d87675e123 ">
                  <p>The value of the header, evaluated as a formula. For more on setting custom header
                    values, see <a href="https://help.salesforce.com/s/articleView?id=xcloud.nc_custom_headers_and_api_keys.htm&amp;release=264.0.0&amp;type=5" title="Web services often define their own authentication protocols using custom headers. For those cases, you can create a custom header for a named or external credential and use API keys as a password.">Use API Keys in Custom Headers with Named Credentials</a>, <a href="https://help.salesforce.com/s/articleView?id=xcloud.nc_custom_headers_basic_auth.htm&amp;release=264.0.0&amp;type=5" title="Create an external credential with a custom header that uses HTTP Basic authentication.">Use Custom Headers for Basic Authentication with Named Credentials</a>, and <a href="https://help.salesforce.com/s/articleView?id=xcloud.nc_named_creds_formula_functions.htm&amp;release=264.0.0&amp;type=5" title="Formula functions can be used in the value field of a custom header of a named credential or external credential.">Use Named Credential Formula Functions in Custom Headers</a>.
                  </p>
                  <p style="margin-bottom:0;">If you’re using a formula in a
                    custom header and you’ve chosen Named Principal as your identity type, don’t use <code>$User</code> in the formula.</p>
                </td>
              </tr>
              <tr class="">
                <td data-label="Field" class="slds-cell-wrap" style="vertical-align:top;" headers="d87675e121 "><strong class="uicontrol">Sequence Number</strong></td>
                <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d87675e123 ">A number that determines the order in which headers are sent out in the callout.
                  Headers with lower numbers are sent out first.</td>
              </tr>
            </tbody>
          </table>
5. Save the custom header.

By default, Salesforce generates a standard authorization header for each callout to a named-credential-defined endpoint. After you create a custom header, disable **Generate Authorization Header** in the associated named credential.

#### See Also

- [Named Credentials](https://help.salesforce.com/s/articleView?id=xcloud.named_credentials_about.htm&release=264.0.0&type=5 "Intended to secure and simplify authenticated API callouts to external systems, a named credential specifies the URL of a callout endpoint and its required authentication parameters in one definition. To streamline your Apex code and simplify the setup of authenticated callouts, specify a named credential as the callout endpoint.")
- [Create Named Credentials and External Credentials](https://help.salesforce.com/s/articleView?id=xcloud.nc_named_creds_and_ext_creds.htm&release=264.0.0&type=5 "To simplify the setup of authenticated callouts, create an external credential to specify an authentication protocol and then specify a named credential as the callout endpoint. Add custom headers to cover more use cases and security requirements. Use a permission set or profile to grant access so that users can make authenticated callouts. You can create and configure named credentials programmatically or through the Salesforce UI.")
- [Use Custom Headers with Credentials](https://help.salesforce.com/s/articleView?id=xcloud.nc_cred_custom_headers.htm&release=264.0.0&type=5 "Add custom headers to external credentials to cover more use cases and security requirements. With custom headers, you can set your own parameters for authentication.")