diff --git a/api_db.php b/api_db.php
index fca897a2e..f060d47bb 100644
--- a/api_db.php
+++ b/api_db.php
@@ -192,7 +192,7 @@
$limit = ' AND timestamp <= :until';
}
// Select top permitted domains only
- $stmt = $db->prepare('SELECT domain,count(domain) FROM queries WHERE status IN (2,3,12,13,14)'.$limit.' GROUP by domain order by count(domain) desc limit 20');
+ $stmt = $db->prepare('SELECT domain,count(domain) FROM queries WHERE status IN (2,3,12,13,14,17)'.$limit.' GROUP by domain order by count(domain) desc limit 20');
$stmt->bindValue(':from', intval($_GET['from']), SQLITE3_INTEGER);
$stmt->bindValue(':until', intval($_GET['until']), SQLITE3_INTEGER);
$results = $stmt->execute();
diff --git a/db_queries.php b/db_queries.php
index d08edf297..af5b0af18 100644
--- a/db_queries.php
+++ b/db_queries.php
@@ -49,6 +49,7 @@