---
title: Creating referrals
description: Create a smart referral by adding an entry with the referral and extensibleObject object classes or adding the object classes to a specific entry.
component: pingdirectory
version: 11.0
page_id: pingdirectory:pingdirectory_server_administration_guide:pd_ds_create_referrals
canonical_url: https://docs.pingidentity.com/pingdirectory/11.0/pingdirectory_server_administration_guide/pd_ds_create_referrals.html
revdate: May 10, 2024
section_ids:
  about-this-task: About this task
  steps: Steps
  example: Example:
  example-2: Example:
  example-3: Example:
  result: Result:
---

# Creating referrals

Create a smart referral by adding an entry with the referral and `extensibleObject` object classes or adding the object classes to a specific entry.

## About this task

The referral object class designates the entry as a referral object. The `extensibleObject` object class allows you to match the target entry by matching any schema attribute. The following example shows how to set up a smart referral if a portion of a directory information tree (DIT) is located on another server.

To create a referral:

## Steps

1. Create an LDIF file with an entry that contains the `referral` and `extensibleObject` object classes.

   ### Example:

   ```
   dn: ou=EngineeringTeam1,ou=People,dc=example,dc=com
   objectClass: top
   objectClass: referral
   objectClass: extensibleObject
   ou: Engineering Team1
   ref: ldap://server2.example.com:6389/ou=EngineeringTeam1,ou=People,dc=example,dc=com
   ```

2. On the first server, add the referral entry using the `ldapmodify` command.

   ### Example:

   ```shell
   $ bin/ldapmodify --defaultAdd --fileName referral-entry.ldif
   ```

3. To verify the addition, search for a user.

   ### Example:

   ```shell
   $ bin/ldapsearch --baseDN ou=People,dc=example,dc=com "(uid=user.4)"
   ```

   ### Result:

   ```
   SearchReference(referralURLs={ldap://server2.example.com:6389/
   ou=EngineeringTeam1,ou=People,dc=example,dc=com??sub?})
   ```
