diff --git a/URLNormalizer.php b/URLNormalizer.php
index <HASH>..<HASH> 100644
--- a/URLNormalizer.php
+++ b/URLNormalizer.php
@@ -105,7 +105,12 @@ class URLNormalizer {
             $fragment = '#' . $this->fragment;
         }
 
-        return $this->scheme . $this->host . $this->port . $this->user . $this->pass . $this->path . $query . $fragment;
+        $port = '';
+        if ( $this->port ) {
+            $port = ':' . $this->port;
+        }
+
+        return $this->scheme . $this->host . $port . $this->user . $this->pass . $this->path . $query . $fragment;
     }
 
     /**
diff --git a/URLNormalizerTest.php b/URLNormalizerTest.php
index <HASH>..<HASH> 100644
--- a/URLNormalizerTest.php
+++ b/URLNormalizerTest.php
@@ -130,4 +130,11 @@ class URLNormalizerTest extends PHPUnit_Framework_TestCase
 	    $this->fixture->setUrl( $url );
 	    $this->assertEquals( $url, $this->fixture->normalize() );
 	}
+
+    public function testPortNumbersArePreserved() {
+        $url = 'http://example.com:81/index.html';
+
+        $this->fixture->setUrl( $url );
+        $this->assertEquals( $url, $this->fixture->normalize() );
+    }
 }
Port numbers are now correctly preserved after normalisation