diff --git a/core/lib/Drupal/Core/PathProcessor/PathProcessorAlias.php b/core/lib/Drupal/Core/PathProcessor/PathProcessorAlias.php
index cfcf32e..6b28038 100644
--- a/core/lib/Drupal/Core/PathProcessor/PathProcessorAlias.php
+++ b/core/lib/Drupal/Core/PathProcessor/PathProcessorAlias.php
@@ -44,8 +44,10 @@ public function processInbound($path, Request $request) {
    * Implements Drupal\Core\PathProcessor\OutboundPathProcessorInterface::processOutbound().
    */
   public function processOutbound($path, &$options = array(), Request $request = NULL) {
-    $langcode = isset($options['language']) ? $options['language']->id : NULL;
-    $path = $this->aliasManager->getPathAlias($path, $langcode);
+    if (empty($options['alias'])) {
+      $langcode = isset($options['language']) ? $options['language']->id : NULL;
+      $path = $this->aliasManager->getPathAlias($path, $langcode);
+    }
     return $path;
   }
 }
diff --git a/core/modules/path/lib/Drupal/path/Tests/PathAliasTest.php b/core/modules/path/lib/Drupal/path/Tests/PathAliasTest.php
index 37012e2..184c9d9 100644
--- a/core/modules/path/lib/Drupal/path/Tests/PathAliasTest.php
+++ b/core/modules/path/lib/Drupal/path/Tests/PathAliasTest.php
@@ -154,6 +154,12 @@ function testNodeAlias() {
     $this->assertText($node1->label(), 'Alias works.');
     $this->assertResponse(200);
 
+    // Confirm the 'canonical' and 'shortlink' URLs.
+    $elements = $this->xpath("//link[contains(@rel, 'canonical') and contains(@href, '" . $edit['path[alias]'] . "')]");
+    $this->assertTrue(!empty($elements), 'Page contains canonical link URL.');
+    $elements = $this->xpath("//link[contains(@rel, 'shortlink') and contains(@href, 'node/" . $node1->id() . "')]");
+    $this->assertTrue(!empty($elements), 'Page contains shortlink URL.');
+
     // Change alias to one containing "exotic" characters.
     $previous = $edit['path[alias]'];
     $edit['path[alias]'] = "- ._~!$'\"()*@[]?&+%#,;=:" . // "Special" ASCII characters.
