diff --git a/core/modules/comment/comment.module b/core/modules/comment/comment.module
index e1d74b6..116609c 100644
--- a/core/modules/comment/comment.module
+++ b/core/modules/comment/comment.module
@@ -660,6 +660,7 @@ function template_preprocess_comment(&$variables) {
     $attributes = $uri->getOption('attributes') ?: array();
     $attributes += array('class' => array('permalink'), 'rel' => 'bookmark');
     $uri->setOption('attributes', $attributes);
+    $uri->setOption('fragment', 'comment-' . $comment->id());
     $variables['title'] = \Drupal::l($comment->getSubject(), $uri);
 
     $variables['permalink'] = \Drupal::l(t('Permalink'), $comment->permalink());
diff --git a/core/modules/comment/src/Tests/CommentTitleTest.php b/core/modules/comment/src/Tests/CommentTitleTest.php
index dd1c97a..9f9b4ef 100644
--- a/core/modules/comment/src/Tests/CommentTitleTest.php
+++ b/core/modules/comment/src/Tests/CommentTitleTest.php
@@ -64,5 +64,9 @@ public function testCommentPopulatedTitles() {
     $this->assertTrue($this->commentExists($comment1), 'Comment #1. Comment found.');
     // Tests that markup is created for comment with heading.
     $this->assertPattern('|<h3[^>]*><a[^>]*>' . $subject_text . '</a></h3>|', 'Comment title is rendered in h3 when title populated.');
+    // Tests that the comment's title has the correct link.
+    $comment_permalink = $this->cssSelect('.permalink');
+    $comment_permalink = (string) $comment_permalink[0]['href'];
+    $this->assertEqual(base_path() . 'comment/' . $comment1->id() . '#comment-' . $comment1->id(), $comment_permalink, 'The comment\'s title has the correct link');
   }
 }
