diff --git a/dns/resolver.py b/dns/resolver.py
index 3709f46..ffc6a25 100644
--- a/dns/resolver.py
+++ b/dns/resolver.py
@@ -16,7 +16,6 @@
 # OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 
 """DNS stub resolver."""
-
 from urllib.parse import urlparse
 import socket
 import sys
@@ -540,6 +539,7 @@ class Resolver(object):
         self.flags = None
         self.retry_servfail = False
         self.rotate = False
+        self.ndots = None
 
         self.reset()
         if configure:
@@ -571,11 +571,24 @@ class Resolver(object):
         self.flags = None
         self.retry_servfail = False
         self.rotate = False
+        self.ndots = None
 
     def read_resolv_conf(self, f):
         """Process *f* as a file in the /etc/resolv.conf format.  If f is
         a ``text``, it is used as the name of the file to open; otherwise it
-        is treated as the file itself."""
+        is treated as the file itself.
+
+        Interprets the following items:
+
+        - nameserver - name server IP address
+
+        - domain - local domain name
+
+        - search - search list for host-name lookup
+
+        - options - supported options are rotate, timeout, edns0, and ndots
+
+        """
 
         if isinstance(f, str):
             try:
@@ -604,8 +617,21 @@ class Resolver(object):
                     for suffix in tokens[1:]:
                         self.search.append(dns.name.from_text(suffix))
                 elif tokens[0] == 'options':
-                    if 'rotate' in tokens[1:]:
-                        self.rotate = True
+                    for opt in tokens[1:]:
+                        if opt == 'rotate':
+                            self.rotate = True
+                        elif opt == 'edns0':
+                            self.use_edns(0, 0, 0)
+                        elif 'timeout' in opt:
+                            try:
+                                self.timeout = int(opt.split(':')[1])
+                            except (ValueError, IndexError):
+                                pass
+                        elif 'ndots' in opt:
+                            try:
+                                self.ndots = int(opt.split(':')[1])
+                            except (ValueError, IndexError):
+                                pass
         finally:
             if want_close:
                 f.close()
@@ -864,7 +890,8 @@ class Resolver(object):
                 qnames_to_try.append(qname.concatenate(dns.name.root))
             if self.search:
                 for suffix in self.search:
-                    qnames_to_try.append(qname.concatenate(suffix))
+                    if self.ndots is None or len(qname.labels) >= self.ndots:
+                        qnames_to_try.append(qname.concatenate(suffix))
             else:
                 qnames_to_try.append(qname.concatenate(self.domain))
         all_nxdomain = True

Parse additional options from resolv.conf
``read_resolv_conf`` only understands the rotate option. ``/etc/resolv.conf`` has more options like timeout.

https://github.com/rthalley/dnspython/blob/aab95c61d554dcf8bc2cf991811165a320991b8c/dns/resolver.py#L586-L604

Please consider to support additional options like global timeout, https://linux.die.net/man/5/resolv.conf
diff --git a/tests/test_resolver.py b/tests/test_resolver.py
index 3d44780..5809650 100644
--- a/tests/test_resolver.py
+++ b/tests/test_resolver.py
@@ -45,6 +45,12 @@ nameserver 10.0.0.1
 nameserver 10.0.0.2
 """
 
+resolv_conf_options1 = """
+nameserver 10.0.0.1
+nameserver 10.0.0.2
+options rotate timeout:1 edns0 ndots:2
+"""
+
 message_text = """id 1234
 opcode QUERY
 rcode NOERROR
@@ -110,6 +116,15 @@ class BaseResolverTests(unittest.TestCase):
             self.assertEqual(r.nameservers, ['10.0.0.1', '10.0.0.2'])
             self.assertEqual(r.domain, dns.name.from_text('foo'))
 
+        def testReadOptions(self):
+            f = StringIO(resolv_conf_options1)
+            r = dns.resolver.Resolver(f)
+            self.assertEqual(r.nameservers, ['10.0.0.1', '10.0.0.2'])
+            self.assertTrue(r.rotate)
+            self.assertEqual(r.timeout, 1)
+            self.assertEqual(r.ndots, 2)
+            self.assertEqual(r.edns, 0)
+
     def testCacheExpiration(self):
         message = dns.message.from_text(message_text)
         name = dns.name.from_text('example.')

pip install -e .[all]
parse_log_pytest
requirements.txt
nose nose-cov pytest
3.7
requirements.txt
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
certifi @ file:///croot/certifi_1671487769961/work/certifi
charset-normalizer==3.4.1
cov-core==1.15.0
coverage==7.2.7
-e git+https://github.com/rthalley/dnspython.git@474eebc175817657db2af844db23abcf814cbe8f#egg=dnspython
exceptiongroup==1.2.2
idna==3.10
importlib-metadata==6.7.0
iniconfig==2.0.0
nose==1.3.7
nose-cov==1.6
packaging==24.0
pluggy==1.2.0
pytest==7.4.4
requests==2.31.0
requests-toolbelt==1.0.0
tomli==2.0.1
typing_extensions==4.7.1
urllib3==2.0.7
zipp==3.15.0

name: dnspython
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - ca-certificates=2025.2.25=h06a4308_0
  - certifi=2022.12.7=py37h06a4308_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.4.4=h6a678d5_1
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=1.1.1w=h7f8727e_0
  - pip=22.3.1=py37h06a4308_0
  - python=3.7.16=h7a1cb2a_0
  - readline=8.2=h5eee18b_0
  - setuptools=65.6.3=py37h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - wheel=0.38.4=py37h06a4308_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - charset-normalizer==3.4.1
      - cov-core==1.15.0
      - coverage==7.2.7
      - exceptiongroup==1.2.2
      - idna==3.10
      - importlib-metadata==6.7.0
      - iniconfig==2.0.0
      - nose==1.3.7
      - nose-cov==1.6
      - packaging==24.0
      - pluggy==1.2.0
      - pytest==7.4.4
      - requests==2.31.0
      - requests-toolbelt==1.0.0
      - tomli==2.0.1
      - typing-extensions==4.7.1
      - urllib3==2.0.7
      - zipp==3.15.0
prefix: /opt/conda/envs/dnspython

tests/test_resolver.py::BaseResolverTests::testReadOptions tests/test_resolver.py::SelectResolverTestCase::testReadOptions tests/test_resolver.py::PollResolverTestCase::testReadOptions
tests/test_resolver.py::BaseResolverTests::testZoneForName1 tests/test_resolver.py::BaseResolverTests::testZoneForName2 tests/test_resolver.py::BaseResolverTests::testZoneForName3 tests/test_resolver.py::SelectResolverTestCase::testZoneForName1 tests/test_resolver.py::SelectResolverTestCase::testZoneForName2 tests/test_resolver.py::SelectResolverTestCase::testZoneForName3 tests/test_resolver.py::PollResolverTestCase::testZoneForName1 tests/test_resolver.py::PollResolverTestCase::testZoneForName2 tests/test_resolver.py::PollResolverTestCase::testZoneForName3
tests/test_resolver.py::BaseResolverTests::testCacheCleaning tests/test_resolver.py::BaseResolverTests::testCacheExpiration tests/test_resolver.py::BaseResolverTests::testEmptyAnswerSection tests/test_resolver.py::BaseResolverTests::testIndexErrorOnEmptyRRsetAccess tests/test_resolver.py::BaseResolverTests::testIndexErrorOnEmptyRRsetDelete tests/test_resolver.py::BaseResolverTests::testLRUDoesLRU tests/test_resolver.py::BaseResolverTests::testLRUExpiration tests/test_resolver.py::BaseResolverTests::testLRUReplace tests/test_resolver.py::BaseResolverTests::testRead tests/test_resolver.py::BaseResolverTests::testZoneForName4 tests/test_resolver.py::SelectResolverTestCase::testCacheCleaning tests/test_resolver.py::SelectResolverTestCase::testCacheExpiration tests/test_resolver.py::SelectResolverTestCase::testEmptyAnswerSection tests/test_resolver.py::SelectResolverTestCase::testIndexErrorOnEmptyRRsetAccess tests/test_resolver.py::SelectResolverTestCase::testIndexErrorOnEmptyRRsetDelete tests/test_resolver.py::SelectResolverTestCase::testLRUDoesLRU tests/test_resolver.py::SelectResolverTestCase::testLRUExpiration tests/test_resolver.py::SelectResolverTestCase::testLRUReplace tests/test_resolver.py::SelectResolverTestCase::testRead tests/test_resolver.py::SelectResolverTestCase::testZoneForName4 tests/test_resolver.py::PollResolverTestCase::testCacheCleaning tests/test_resolver.py::PollResolverTestCase::testCacheExpiration tests/test_resolver.py::PollResolverTestCase::testEmptyAnswerSection tests/test_resolver.py::PollResolverTestCase::testIndexErrorOnEmptyRRsetAccess tests/test_resolver.py::PollResolverTestCase::testIndexErrorOnEmptyRRsetDelete tests/test_resolver.py::PollResolverTestCase::testLRUDoesLRU tests/test_resolver.py::PollResolverTestCase::testLRUExpiration tests/test_resolver.py::PollResolverTestCase::testLRUReplace tests/test_resolver.py::PollResolverTestCase::testRead tests/test_resolver.py::PollResolverTestCase::testZoneForName4 tests/test_resolver.py::NXDOMAINExceptionTestCase::test_nxdomain_canonical_name tests/test_resolver.py::NXDOMAINExceptionTestCase::test_nxdomain_compatible tests/test_resolver.py::NXDOMAINExceptionTestCase::test_nxdomain_merge tests/test_resolver.py::ResolverNameserverValidTypeTestCase::test_set_nameservers_invalid_type tests/test_resolver.py::ResolverNameserverValidTypeTestCase::test_set_nameservers_to_list tests/test_resolver.py::ResolverNameserverValidTypeTestCase::test_set_namservers_to_empty_list
dns/resolver.py
dns/resolver.py