Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

We have an application which connects to an Active Directory (MS) using LDAP protocol.

We give usually the following parameters:

 ldapUrl        = ldap://myserver.mydomain.ext:389
 ldapBaseDn     = OU=DPT,DC=mydomain,DC=org
 ldapBindDn     = CN=ldapuser,OU=Service Account,DC=mydomain,DC=org
 ldapBindPwd    = thepassword

Some people in our organisation says that the hostname (myserver) is not mandatory anymore and the url could be defined like this:

 ldapUrl        = ldap://mydomain.ext/

... and the domain controller will find automatically find which LDAP (AD) server to use (it is in a clustered environment)

I know the port is not mandatory as the 389 is the default port for LDAP protocol, but I never heard that the server is optional as well.

Can somebody confirm it is correct or not and if it is, point me to an article (because yes, I tried to google it, but did not find anything useful).

I guess if that notation is supported it is not always the case for all (LDAP) clients and perhaps it is only a Microsoft shortcut.

share|improve this question
up vote 1 down vote accepted

While it might be true for AD (I don't know if it is or not), this is not certainly not correct in a general sense for LDAP. I guess AD will add some SRV records into the DNS allowing this, but there is no guarantee a client actually reads them when trying to connect to an LDAP server.

share|improve this answer
Thanks for your answer, in fact you point me to the right place by mentionning DNS. In fact by doing a nslookup I can see a list of all the IP's (which are the DC/AD). – ruffp Jun 19 '13 at 10:30

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.