diff --git a/metatag.module b/metatag.module
index f42ead9..b0f4cd3 100644
--- a/metatag.module
+++ b/metatag.module
@@ -14,6 +14,8 @@
 use Drupal\Core\Language\LanguageInterface;
 use Drupal\Core\Routing\RouteMatchInterface;
 use Drupal\Core\Url;
+use Drupal\Component\Utility\Html;
+
 
 /**
  * Implements hook_help().
@@ -128,6 +130,21 @@ function metatag_page_attachments(array &$attachments) {
       }
       foreach ($metatag_attachments['#attached']['html_head'] as $item) {
         $attachments['#attached']['html_head'][] = $item;
+
+        // Also add a HTTP header "Link:" for canonical urls and shortlinks.
+        // See HtmlResponseAttachmentsProcessor::processHtmlHeadLink() for the
+        // implementation of the functionality in core.
+        if (in_array($item[1], array('canonical_url', 'shortlink'))) {
+          $attributes = $item[0]['#attributes'];
+
+          $href = '<' . Html::escape($attributes['href']) . '>';
+          unset($attributes['href']);
+          if ($param = drupal_http_header_attributes($attributes)) {
+            $href .= ';' . $param;
+          }
+
+          $attachments['#attached']['http_header'][] = ['Link', $href, FALSE];
+        }
       }
     }
   }
