diff --git a/Changelog.md b/Changelog.md
--- a/Changelog.md
+++ b/Changelog.md
@@ -1,3 +1,9 @@
+### 1.2.12
+
+- Module *NgxExport.Tools.Resolve*.
+  + Resolve non-canonical names in *collectA*. Alias records chains of depth up
+    to 12 are supported.
+
 ### 1.2.11
 
 - Module *NgxExport.Tools.Resolve*.
diff --git a/LICENSE b/LICENSE
--- a/LICENSE
+++ b/LICENSE
@@ -1,7 +1,7 @@
 The following license covers this documentation, and the source code, except
 where otherwise indicated.
 
-Copyright 2019-2024, Alexey Radkov. All rights reserved.
+Copyright 2019-2026, Alexey Radkov. All rights reserved.
 
 Redistribution and use in source and binary forms, with or without
 modification, are permitted provided that the following conditions are met:
diff --git a/NgxExport/Tools/Resolve.hs b/NgxExport/Tools/Resolve.hs
--- a/NgxExport/Tools/Resolve.hs
+++ b/NgxExport/Tools/Resolve.hs
@@ -5,7 +5,7 @@
 -----------------------------------------------------------------------------
 -- |
 -- Module      :  NgxExport.Tools.Resolve
--- Copyright   :  (c) Alexey Radkov 2022-2024
+-- Copyright   :  (c) Alexey Radkov 2022-2026
 -- License     :  BSD-style
 --
 -- Maintainer  :  alexey.radkov@gmail.com
@@ -425,6 +425,9 @@
 
 -- | Queries an /A/ record for the given domain name.
 --
+-- If the domain name happens to be non-canonical, this function tries to
+-- resolve the chain of alias records of maximum depth up to 12.
+--
 -- Returns a list of IP addresses and the minimum value of their TTLs. If the
 -- list is empty, then the returned TTL value gets taken from the first
 -- argument.
@@ -433,8 +436,18 @@
     -> Name                     -- ^ Domain name
     -> IO (TTL, [IPv4])
 collectA lTTL (Name n) = do
-    !srv <- queryA $ Name $ C8.takeWhile (':' /=) n
+    !srv <- collectName (0 :: Int) $ Name $ C8.takeWhile (':' /=) n
     return (minimumTTL lTTL $ map fst srv, map snd srv)
+    where collectName 12 _ = return []
+          collectName i n' = do
+              addrs <- queryA n'
+              case addrs of
+                  [] -> do
+                      cn <- queryCNAME n'
+                      case cn of
+                          (_, cn') : _ -> collectName (succ i) cn'
+                          _ -> return addrs
+                  _ -> return addrs
 
 -- | Queries an /SRV/ record for the given service name.
 --
diff --git a/ngx-export-tools-extra.cabal b/ngx-export-tools-extra.cabal
--- a/ngx-export-tools-extra.cabal
+++ b/ngx-export-tools-extra.cabal
@@ -1,5 +1,5 @@
 name:                       ngx-export-tools-extra
-version:                    1.2.11
+version:                    1.2.12
 synopsis:                   More extra tools for Nginx Haskell module
 description:                More extra tools for
         <https://github.com/lyokha/nginx-haskell-module Nginx Haskell module>.
@@ -10,7 +10,7 @@
 author:                     Alexey Radkov <alexey.radkov@gmail.com>
 maintainer:                 Alexey Radkov <alexey.radkov@gmail.com>
 stability:                  stable
-copyright:                  2019-2024 Alexey Radkov
+copyright:                  2019-2026 Alexey Radkov
 category:                   Network
 build-type:                 Simple
 cabal-version:              1.20
