diff --git a/core/modules/views/src/Plugin/views/display/Feed.php b/core/modules/views/src/Plugin/views/display/Feed.php
index 67171ab..c558b89 100644
--- a/core/modules/views/src/Plugin/views/display/Feed.php
+++ b/core/modules/views/src/Plugin/views/display/Feed.php
@@ -258,6 +258,11 @@ public function submitOptionsForm(&$form, FormStateInterface $form_state) {
    * {@inheritdoc}
    */
   public function attachTo(ViewExecutable $clone, $display_id, array &$build) {
+    // Disabled feed attachments do not attach.
+    if (!$this->isEnabled()) {
+      return;
+    }
+
     $displays = $this->getOption('displays');
     if (empty($displays[$display_id])) {
       return;
diff --git a/core/modules/views/src/Tests/Plugin/DisplayFeedTest.php b/core/modules/views/src/Tests/Plugin/DisplayFeedTest.php
index cef9bab..0a23f40 100644
--- a/core/modules/views/src/Tests/Plugin/DisplayFeedTest.php
+++ b/core/modules/views/src/Tests/Plugin/DisplayFeedTest.php
@@ -20,7 +20,7 @@ class DisplayFeedTest extends PluginTestBase {
    *
    * @var array
    */
-  public static $testViews = array('test_display_feed');
+  public static $testViews = array('test_display_feed', 'test_disabled_feed');
 
   /**
    * Modules to enable.
@@ -74,4 +74,35 @@ public function testFeedOutput() {
     $this->assertTrue(strpos($feed_icon[0]['href'], 'test-feed-display.xml'), 'The feed icon was found.');
   }
 
+  /**
+   * Tests that nothing is output when the feed display is disabled.
+   */
+  public function testDisabledFeed() {
+    $this->drupalCreateContentType(['type' => 'page']);
+    $node = $this->drupalCreateNode();
+
+    // Ensure that the feed_1 display is attached to the page_1 display.
+    $view = $this->container->get('entity.manager')->getStorage('view')->load('test_disabled_feed');
+    $view->getExecutable()->setDisplay('page_1');
+    $this->assertEqual($view->getExecutable()->display_handler->getAttachedDisplays(), array('feed_1'), 'The feed display is attached to the page display.');
+
+    // Check that the rss header is output on the page display.
+    $this->drupalGet('/test-feed-disabled');
+    $feed_header = $this->xpath('//link[@rel="alternate"]');
+    $this->assertEqual($feed_header[0]['type'], 'application/rss+xml', 'The feed link has the type application/rss+xml.');
+    $this->assertTrue(strpos($feed_header[0]['href'], 'test-feed-disabled.xml'), 'Page display contains the correct feed URL.');
+
+    // Disable the feed display.
+    $view->getExecutable()->displayHandlers->get('feed_1')->setOption('enabled', FALSE);
+    $view->save();
+
+    // Ensure there is no link rel present on the page.
+    $this->drupalGet('/test-feed-disabled');
+    $result = $this->xpath('//link[@rel="alternate"]');
+    $this->assertTrue(empty($result), 'Page display does not contain a feed header.');
+
+    // Ensure the feed attachment returns 'Not found'.
+    $this->drupalGet('/test-feed-disabled.xml');
+    $this->assertResponse(404);
+  }
 }
diff --git a/core/modules/views/tests/modules/views_test_config/test_views/views.view.test_disabled_feed.yml b/core/modules/views/tests/modules/views_test_config/test_views/views.view.test_disabled_feed.yml
new file mode 100644
index 0000000..edabfd8
--- /dev/null
+++ b/core/modules/views/tests/modules/views_test_config/test_views/views.view.test_disabled_feed.yml
@@ -0,0 +1,176 @@
+langcode: und
+status: true
+dependencies:
+  config:
+    - core.entity_view_mode.node.teaser
+  module:
+    - node
+    - user
+module: views
+id: test_disabled_feed
+label: test_disabled_feed
+description: ''
+tag: ''
+base_table: node
+base_field: nid
+core: 8.x
+display:
+  default:
+    display_plugin: default
+    id: default
+    display_title: Master
+    position: 0
+    display_options:
+      access:
+        type: perm
+        options:
+          perm: 'access content'
+      cache:
+        type: none
+        options: {  }
+      query:
+        type: views_query
+        options:
+          disable_sql_rewrite: false
+          distinct: false
+          replica: false
+          query_comment: false
+          query_tags: {  }
+      exposed_form:
+        type: basic
+        options:
+          submit_button: Apply
+          reset_button: false
+          reset_button_label: Reset
+          exposed_sorts_label: 'Sort by'
+          expose_sort_order: true
+          sort_asc_label: Asc
+          sort_desc_label: Desc
+      pager:
+        type: full
+        options:
+          items_per_page: 10
+          offset: 0
+          id: 0
+          total_pages: null
+          expose:
+            items_per_page: false
+            items_per_page_label: 'Items per page'
+            items_per_page_options: '5, 10, 25, 50'
+            items_per_page_options_all: false
+            items_per_page_options_all_label: '- All -'
+            offset: false
+            offset_label: Offset
+          tags:
+            previous: '‹ previous'
+            next: 'next ›'
+            first: '« first'
+            last: 'last »'
+          quantity: 9
+      style:
+        type: default
+      row:
+        type: 'entity:node'
+        options:
+          view_mode: teaser
+      fields:
+        title:
+          id: title
+          table: node_field_data
+          field: title
+          entity_type: node
+          entity_field: title
+          label: ''
+          alter:
+            alter_text: false
+            make_link: false
+            absolute: false
+            trim: false
+            word_boundary: false
+            ellipsis: false
+            strip_tags: false
+            html: false
+          hide_empty: false
+          empty_zero: false
+          link_to_node: true
+          plugin_id: node
+          relationship: none
+          group_type: group
+          admin_label: ''
+          exclude: false
+          element_type: ''
+          element_class: ''
+          element_label_type: ''
+          element_label_class: ''
+          element_label_colon: true
+          element_wrapper_type: ''
+          element_wrapper_class: ''
+          element_default_classes: true
+          empty: ''
+          hide_alter_empty: true
+      filters:
+        status:
+          value: true
+          table: node_field_data
+          field: status
+          plugin_id: boolean
+          entity_type: node
+          entity_field: status
+          id: status
+          expose:
+            operator: ''
+          group: 1
+      sorts:
+        created:
+          id: created
+          table: node_field_data
+          field: created
+          order: DESC
+          entity_type: node
+          entity_field: created
+          plugin_id: date
+          relationship: none
+          group_type: group
+          admin_label: ''
+          exposed: false
+          expose:
+            label: ''
+          granularity: second
+      title: Page
+      header: {  }
+      footer: {  }
+      empty: {  }
+      relationships: {  }
+      arguments: {  }
+      display_extenders: {  }
+      field_langcode: '***LANGUAGE_language_content***'
+      field_langcode_add_to_query: null
+  feed_1:
+    display_plugin: feed
+    id: feed_1
+    display_title: Feed
+    position: 2
+    display_options:
+      display_extenders: {  }
+      field_langcode: '***LANGUAGE_language_content***'
+      field_langcode_add_to_query: null
+      pager:
+        type: some
+      style:
+        type: rss
+      row:
+        type: node_rss
+      path: test-feed-disabled.xml
+      displays:
+        page_1: page_1
+        default: '0'
+  page_1:
+    display_plugin: page
+    id: page_1
+    display_title: Page
+    position: 1
+    display_options:
+      display_extenders: {  }
+      field_langcode: '***LANGUAGE_language_content***'
+      field_langcode_add_to_query: null
+      path: test-feed-disabled
