diff --git a/core/lib/Drupal/Core/Utility/LinkGenerator.php b/core/lib/Drupal/Core/Utility/LinkGenerator.php
index c29b332..4de9c6a 100644
--- a/core/lib/Drupal/Core/Utility/LinkGenerator.php
+++ b/core/lib/Drupal/Core/Utility/LinkGenerator.php
@@ -96,7 +96,7 @@ public function generateFromUrl($text, Url $url) {
 
       // Add a "data-drupal-link-system-path" attribute to let the
       // drupal.active-link library know the path in a standardized manner.
-      if (!isset($variables['options']['attributes']['data-drupal-link-system-path'])) {
+      if (!isset($variables['options']['attributes']['data-drupal-link-system-path']) && !$url->isExternal()) {
         // @todo System path is deprecated - use the route name and parameters.
         $variables['options']['attributes']['data-drupal-link-system-path'] = $url->getInternalPath();
       }
