diff --git a/Changelog b/Changelog
--- a/Changelog
+++ b/Changelog
@@ -1,3 +1,7 @@
+2.0.8
+	- Better handling of encoding and decoding the "root" domain ".". [#45](https://github.com/kazu-yamamoto/dns/pull/45)
+2.0.7
+	- Add length checks for A and AAAA records. [#43](https://github.com/kazu-yamamoto/dns/pull/43)
 2.0.6
 	- Adding Ord instance. [#41](https://github.com/kazu-yamamoto/dns/pull/41)
 	- Adding DNSSEC-related RRTYPEs [#40](https://github.com/kazu-yamamoto/dns/pull/40)
diff --git a/Network/DNS/Decode.hs b/Network/DNS/Decode.hs
--- a/Network/DNS/Decode.hs
+++ b/Network/DNS/Decode.hs
@@ -269,7 +269,7 @@
     let n = getValue c
     -- Syntax hack to avoid using MultiWayIf
     case () of
-        _ | c == 0 -> return ""
+        _ | c == 0 -> return "." -- Perhaps the root domain?
         _ | isPointer c -> do
             d <- getInt8
             let offset = n * 256 + d
@@ -285,7 +285,10 @@
         _ | otherwise -> do
             hs <- getNByteString n
             ds <- decodeDomain
-            let dom = hs `BS.append` "." `BS.append` ds
+            let dom =
+                    case ds of -- avoid trailing ".."
+                        "." -> hs `BS.append` "."
+                        _   -> hs `BS.append` "." `BS.append` ds
             push pos dom
             return dom
   where
diff --git a/Network/DNS/Encode.hs b/Network/DNS/Encode.hs
--- a/Network/DNS/Encode.hs
+++ b/Network/DNS/Encode.hs
@@ -201,9 +201,12 @@
 
 ----------------------------------------------------------------
 
+rootDomain :: Domain
+rootDomain = BS.pack "."
+
 encodeDomain :: Domain -> SPut
 encodeDomain dom
-    | BS.null dom = put8 0
+    | (BS.null dom || dom == rootDomain) = put8 0
     | otherwise = do
         mpos <- wsPop dom
         cur <- gets wsPosition
diff --git a/dns.cabal b/dns.cabal
--- a/dns.cabal
+++ b/dns.cabal
@@ -1,5 +1,5 @@
 Name:                   dns
-Version:                2.0.7
+Version:                2.0.8
 Author:                 Kazu Yamamoto <kazu@iij.ad.jp>
 Maintainer:             Kazu Yamamoto <kazu@iij.ad.jp>
 License:                BSD3
