Enable LDAP over SSL (LDAPS) on a Domain Controller with a Third-Party CA Certificate

Enable LDAP over SSL on a DC with a third-party or Microsoft CA: certificate requirements, a certreq request.inf, certreq -accept, the NTDS service store, renewServerCertificate without a restart and an Ldp.exe test on port 636.

Home › Guides › Enable LDAPS with a third-party CA

Last updated 21 November 2026

Quick answer

There is no user interface for turning on LDAP over SSL (LDAPS). You install a properly formatted certificate on the domain controller, from a Microsoft CA or a non-Microsoft (third-party) CA, and the LDAP service then listens for, and automatically accepts, SSL connections for both LDAP (TCP 636) and global catalog (TCP 3269) traffic. Microsoft's procedure (KB 321051):

  1. Create a request.inf with the DC's FQDN as the subject and the Server Authentication EKU.
  2. certreq -new request.inf request.req and submit Request.req to the CA.
  3. Save the issued certificate base64-encoded as Certnew.cer and run certreq -accept certnew.cer.
  4. Check the certificate in the computer Personal store and restart the DC (or use the NTDS store, below).
  5. Connect with Ldp.exe on port 636.

Certificate requirements

RequirementDetail
StoreThe Local Computer Personal store (the computer MY store). If there is a certificate in the NTDS store, the DC uses that one instead.
Private keyPresent in the Local Computer store and correctly associated with the certificate. It must not have strong private key protection enabled.
Enhanced Key UsageIncludes Server Authentication, OID 1.3.6.1.5.5.7.3.1.
NameThe Active Directory FQDN of the DC (for example dc01.contoso.com) as the CN in the Subject field or as a DNS entry in the Subject Alternative Name extension.
TrustIssued by a CA that the DC and the LDAPS clients trust, by configuring them to trust the root CA the issuing CA chains to.
Key providerGenerate the key with the Schannel cryptographic service provider (CSP).

Create the certificate request

Any tool that creates a valid PKCS #10 request works; Microsoft uses Certreq.exe, which reads a text instruction file. Microsoft's sample request.inf:

;----------------- request.inf -----------------
[Version]
Signature="$Windows NT$

[NewRequest]
Subject = "CN=<DC fqdn>" ; replace with the FQDN of the DC
KeySpec = 1
KeyLength = 1024
; Can be 1024, 2048, 4096, 8192, or 16384.
; Larger key sizes are more secure, but have
; a greater impact on performance.
Exportable = TRUE
MachineKeySet = TRUE
SMIME = False
PrivateKeyArchive = FALSE
UserProtected = FALSE
UseExistingKeySet = FALSE
ProviderName = "Microsoft RSA SChannel Cryptographic Provider"
ProviderType = 12
RequestType = PKCS10
KeyUsage = 0xa0

[EnhancedKeyUsageExtension]
OID=1.3.6.1.5.5.7.3.1 ; this is for Server Authentication
;-----------------------------------------------

Put the fully qualified DNS name of the DC in Subject. Some third-party CAs want more in the subject, such as e-mail (E), OU, O, L, S and C; append them to the CN, for example Subject="E=admin@contoso.com, CN=<DC fqdn>, OU=Servers, O=Contoso, L=Redmond, S=Washington, C=US." Then create the request:

certreq -new request.inf request.req

Request.req is the base64-encoded request. Submit it to a Microsoft CA or a third-party CA (most vendors call the request a Certificate Signing Request, CSR). If clients will reach the DC by an alias such as ldap.contoso.com, add SAN entries to the request (Microsoft's SAN article puts them in the [Extensions] section); otherwise clients that connect by the alias can fail with Schannel event 36884.

Install and check the certificate

  1. Create Certnew.cer in the same folder as the request, open it in Notepad, paste the encoded certificate and save. It must be base64; some third-party CAs send it as base64 text in an e-mail.
  2. Accept it: certreq -accept certnew.cer
  3. In MMC, add the Certificates snap-in for the local computer, expand Certificates (Local Computer) > Personal > Certificates. The new certificate should be there, issued to the computer's fully qualified host name, with Server Authentication as the intended purpose.
  4. Restart the domain controller.

Better: the NTDS service store (Windows Server 2008 and later)

The Local Machine Personal store is still supported, but AD DS looks in the NTDS service's Personal store first. That makes it easier to control which certificate is used when the Local Machine store has several. AD DS notices a new certificate in its store and updates its SSL certificate without restarting AD DS or the DC. To import there (Domain Admins or equivalent):

  1. Open an elevated command prompt and run mmc.
  2. File > Add/Remove Snap-in > Certificates > Add.
  3. Pick Service account > Next, Local computer > Next, Active Directory Domain Services > Finish > OK.
  4. Expand Certificates - Service (Active Directory Domain Services) > Personal > Certificates.
  5. Right-click the NTDS\Personal folder > All Tasks > Import.

For AD LDS, put the certificate in the Personal store of the service that corresponds to the AD LDS instance instead of the NTDS service.

Reload the certificate without a restart (renewServerCertificate)

A DC gets its LDAPS certificates from the operating system at startup. An LDAP modify of the rootDSE attribute renewServerCertificate makes it query again, for example if the available certificates have changed since startup; when the operation returns, the certificates it found are available for LDAPS connections. The requester needs the Reload-SSL-Certificate control access right on the DC's nTDSDSA object. The modify can be add or replace and the value doesn't matter. Microsoft's LDIF sample, which you can import with ldifde.exe (or make the same change in adsiedit.msc):

dn:
changetype: modify
add: renewServerCertificate
renewServerCertificate: 1
-

KB 321051 also notes (as a pre-SP3 caching issue) that when an LDAPS certificate is replaced, by renewal or because the issuing CA changed, the server must be restarted for Schannel to use the new one. The NTDS store and renewServerCertificate are the Windows Server 2008 and later ways to update without restarting AD DS or the DC.

Verify LDAPS with Ldp.exe

  1. Start ldp; Connection > Connect.
  2. Type the DC name, port 636, with SSL selected and Connectionless cleared, and click OK.
  3. RootDSE information in the right pane means LDAPS works. Cannot open connection means LDAP-over-SSL binding is not configured properly.
  4. Optionally Connection > Bind > OK; the output should show the user and domain you bound with.

Until a certificate is in place, LDAPS attempts make the DC log event 1220: LDAP over Secure Sockets Layer (SSL) will be unavailable at this time because the server was unable to obtain a certificate. If it still fails with a certificate installed, see troubleshoot LDAP over SSL connection problems.

Common problems after you install the certificate

ProblemWhat Microsoft says
Wrong certificate usedSchannel picks the first valid certificate in the local computer store, so with several valid certificates it may pick the wrong one. Use the NTDS store. If a Windows Server 2008 or later DC finds several certificates in its store, it picks one at random.
Renewed certificate not usedKB 321051 says the server must be restarted for Schannel to use a replaced certificate (listed as a pre-SP3 issue). On Windows Server 2008 and later, the NTDS store and renewServerCertificate update it without a restart.
Enterprise CA on a DCInstalling AD CS as an Enterprise CA on a DC configures all DCs in the forest to accept LDAPS, but in most cases you should not install a CA on a DC; a CA on the DC you connect to can also cause a certificate conflict.

Related tools and guides

Look up AD DS 1220 and Schannel 36884 in the Windows Event ID Lookup, copy the certreq -new, certreq -accept and certutil -verifykeys lines from the PowerShell Cheat Sheet, check the Subject line of your request.inf with the Regex Tester, check the subnets of the DCs your LDAPS clients use with the IPv4 Subnet Calculator or IPv6 Subnet Calculator, and identify the network adapter vendor of a DC you are enabling LDAPS on with the MAC Vendor Lookup. Related guides: LDAP over SSL connection problems, LDAPS Schannel event 36884, AD replication error 8453 and common AD replication errors.

Hardening LDAP on the domain controllers? See LDAP signing and channel binding (events 2887 and 2889).

Every AD replication error code with its cause and fix: common Active Directory replication errors.

FAQ

How do I enable LDAPS on a domain controller?

Install a valid Server Authentication certificate for the DC. There is no user interface for LDAPS: with the certificate in place the LDAP service listens for and automatically accepts SSL connections for LDAP and global catalog traffic.

Can I use a third-party CA certificate for LDAPS?

Yes. Create the request with certreq -new request.inf request.req, submit it to the CA, save the issued certificate as base64 in Certnew.cer and run certreq -accept certnew.cer. The DC and the clients must trust the root CA.

Can the LDAPS certificate private key have strong protection?

No. The private key must be in the Local Computer store, correctly associated with the certificate, and must not have strong private key protection enabled. Generate the key with the Schannel CSP.

Where should I put the LDAPS certificate?

The Local Computer Personal store works, but on Windows Server 2008 and later you can use the NTDS service Personal store. AD DS checks it first and picks up a new certificate there without a restart.

How do I make a DC use a new LDAPS certificate without a restart?

Use the NTDS store, or do an LDAP modify of the rootDSE attribute renewServerCertificate, for example with ldifde or adsiedit. The requester needs the Reload-SSL-Certificate control access right on the DC nTDSDSA object.

Want the full kit?

Runbooks, checklists and helpdesk templates: IT Admin Packs on Gumroad.