diff --git a/changelog.d/9106.misc b/changelog.d/9106.misc
new file mode 100644
index 0000000000000000000000000000000000000000..4cd26057542846b6d6376218d88f080ba4c3bd29
--- /dev/null
+++ b/changelog.d/9106.misc
@@ -0,0 +1 @@
+Reduce the scope of caught exceptions in `BlacklistingAgentWrapper`.
diff --git a/synapse/http/client.py b/synapse/http/client.py
index 5f74ee114963162d9493dd033f45aa3925b1da05..dc4b81ca60e21c3cd9276fcdee2ea096831c3305 100644
--- a/synapse/http/client.py
+++ b/synapse/http/client.py
@@ -32,7 +32,7 @@ from typing import (
 
 import treq
 from canonicaljson import encode_canonical_json
-from netaddr import IPAddress, IPSet
+from netaddr import AddrFormatError, IPAddress, IPSet
 from prometheus_client import Counter
 from zope.interface import implementer, provider
 
@@ -261,16 +261,16 @@ class BlacklistingAgentWrapper(Agent):
 
         try:
             ip_address = IPAddress(h.hostname)
-
+        except AddrFormatError:
+            # Not an IP
+            pass
+        else:
             if check_against_blacklist(
                 ip_address, self._ip_whitelist, self._ip_blacklist
             ):
                 logger.info("Blocking access to %s due to blacklist" % (ip_address,))
                 e = SynapseError(403, "IP address blocked by IP blacklist entry")
                 return defer.fail(Failure(e))
-        except Exception:
-            # Not an IP
-            pass
 
         return self._agent.request(
             method, uri, headers=headers, bodyProducer=bodyProducer