diff --git a/hive/indexer/community.py b/hive/indexer/community.py
index d57c5acad001a68c8074c319ca50c08cd613d797..1840731a8cc4dfc0900d1941f035f3d474107c7a 100644
--- a/hive/indexer/community.py
+++ b/hive/indexer/community.py
@@ -147,7 +147,7 @@ class Community:
     def validated_name(cls, name):
         """Perform basic validation on community name, then search for id."""
         if (name[:5] == 'hive-'
-                and name[5] in ['1', '2', '3']
+                and len(name) > 5 and name[5] in ['1', '2', '3']
                 and re.match(r'^hive-[123]\d{4,6}$', name)):
             return name
         return None