diff --git a/ChangeLog.md b/ChangeLog.md
--- a/ChangeLog.md
+++ b/ChangeLog.md
@@ -1,3 +1,7 @@
+## 3.1.3
+
+* Add 404 handler [#467](https://github.com/yesodweb/wai/pull/467)
+
 ## 3.1.2
 
 * Honor ssIndices when used with defaultWebAppSettings [#460](https://github.com/yesodweb/wai/pull/460)
diff --git a/Network/Wai/Application/Static.hs b/Network/Wai/Application/Static.hs
--- a/Network/Wai/Application/Static.hs
+++ b/Network/Wai/Application/Static.hs
@@ -22,6 +22,7 @@
     , ssMaxAge
     , ssRedirectToIndex
     , ssAddTrailingSlash
+    , ss404Handler
     ) where
 
 import Prelude hiding (FilePath)
@@ -255,7 +256,9 @@
                 , ("Location", path)
                 ] "Redirect"
 
-    response NotFound = sendResponse $ W.responseLBS H.status404
+    response NotFound = case (ss404Handler ss) of
+        Just app -> app req sendResponse
+        Nothing  -> sendResponse $ W.responseLBS H.status404
                         [ ("Content-Type", "text/plain")
                         ] "File not found"
 
diff --git a/WaiAppStatic/Storage/Filesystem.hs b/WaiAppStatic/Storage/Filesystem.hs
--- a/WaiAppStatic/Storage/Filesystem.hs
+++ b/WaiAppStatic/Storage/Filesystem.hs
@@ -47,6 +47,7 @@
     , ssRedirectToIndex = False
     , ssUseHash = True
     , ssAddTrailingSlash = False
+    , ss404Handler = Nothing
     }
 
 -- | Settings optimized for a file server. More conservative caching will be
@@ -63,6 +64,7 @@
     , ssRedirectToIndex = False
     , ssUseHash = False
     , ssAddTrailingSlash = False
+    , ss404Handler = Nothing
     }
 
 -- | Same as @defaultWebAppSettings@, but additionally uses a specialized
diff --git a/WaiAppStatic/Types.hs b/WaiAppStatic/Types.hs
--- a/WaiAppStatic/Types.hs
+++ b/WaiAppStatic/Types.hs
@@ -144,4 +144,9 @@
 
       -- | Force a trailing slash at the end of directories
     , ssAddTrailingSlash :: Bool
+
+      -- | Optional `W.Application` to be used in case of 404 errors
+      --
+      -- Since 3.1.3
+    , ss404Handler :: Maybe W.Application
     }
diff --git a/wai-app-static.cabal b/wai-app-static.cabal
--- a/wai-app-static.cabal
+++ b/wai-app-static.cabal
@@ -1,5 +1,5 @@
 name:            wai-app-static
-version:         3.1.2
+version:         3.1.3
 license:         MIT
 license-file:    LICENSE
 author:          Michael Snoyman <michael@snoyman.com>
