diff --git a/raven/transport.py b/raven/transport.py
index <HASH>..<HASH> 100644
--- a/raven/transport.py
+++ b/raven/transport.py
@@ -80,9 +80,6 @@ class UDPTransport(Transport):
                 udp_socket = None
 
     def compute_scope(self, url, scope):
-        netloc = url.hostname
-        netloc += ':%s' % url.port
-
         path_bits = url.path.rsplit('/', 1)
         if len(path_bits) > 1:
             path = path_bits[0]
@@ -90,9 +87,12 @@ class UDPTransport(Transport):
             path = ''
         project = path_bits[-1]
 
-        if not all([netloc, project, url.username, url.password]):
+        if not all([url.port, project, url.username, url.password]):
             raise ValueError('Invalid Sentry DSN: %r' % url.geturl())
 
+        netloc = url.hostname
+        netloc += ':%s' % url.port
+
         server = '%s://%s%s/api/store/' % (url.scheme, netloc, path)
         scope.update({
             'SENTRY_SERVERS': [server],
Throw an error if a port is not specified in the UDP transport