Index: src/wp-includes/default-filters.php
===================================================================
--- src/wp-includes/default-filters.php	(revision 37441)
+++ src/wp-includes/default-filters.php	(working copy)
@@ -235,6 +235,8 @@
 add_action( 'wp_head',             'wp_print_head_scripts',            9    );
 add_action( 'wp_head',             'wp_generator'                           );
 add_action( 'wp_head',             'rel_canonical'                          );
+add_action( 'wp_head',             'wp_prerender'                           );
+add_action( 'wp_head',             'wp_dns_prefetch'                        );
 add_action( 'wp_head',             'wp_shortlink_wp_head',            10, 0 );
 add_action( 'wp_head',             'wp_site_icon',                    99    );
 add_action( 'wp_footer',           'wp_print_footer_scripts',         20    );
Index: src/wp-includes/general-template.php
===================================================================
--- src/wp-includes/general-template.php	(revision 37441)
+++ src/wp-includes/general-template.php	(working copy)
@@ -2755,6 +2755,50 @@
 }
 
 /**
+ * Prints out URLs to be prerendered.
+ *
+ * @since 4.6.0
+ */
+function wp_prerender() {
+	/**
+	 * Filter which URLs to prerender.
+	 *
+	 * @since 4.6.0
+	 *
+	 * @param array $prerender_urls URLs to prerender.
+	 */
+	$prerender_urls = apply_filters( 'prerender_urls', array() );
+	$prerender_urls = array_unique( array_map( 'strtolower', $prerender_urls ) );
+
+	foreach ( $prerender_urls as $url ) {
+		$url = esc_url( $url, array( 'http', 'https' ) );
+		printf( "<link rel='prerender' href='%s'>\r\n", $url );
+	}
+}
+
+/**
+ * Prints out domains to prefetch for page speed optimization.
+ *
+ * @since 4.6.0
+ */
+function wp_dns_prefetch() {
+	/**
+	 * Filter the domains to prefetch for page speed optimization.
+	 *
+	 * @since 4.6.0
+	 *
+	 * @param array $prefetch_urls Domains to prefetch.
+	 */
+	$prefetch_domains = apply_filters( 'dns_prefetch_domains', array() );
+	$prefetch_domains = array_unique( array_map( 'strtolower', $prefetch_domains ) );
+
+	foreach ( $prefetch_domains as $domain ) {
+		$domain = esc_url( untrailingslashit( $domain ), array( 'http', 'https' ) );
+		printf( "<link rel='dns-prefetch' href='%s'>\r\n", $domain );
+	}
+}
+
+/**
  * Whether the user should have a WYSIWIG editor.
  *
  * Checks that the user requires a WYSIWIG editor and that the editor is
Index: tests/phpunit/tests/general/template.php
===================================================================
--- tests/phpunit/tests/general/template.php	(revision 37441)
+++ tests/phpunit/tests/general/template.php	(working copy)
@@ -345,4 +345,50 @@
 		$this->custom_logo_id  = $this->_make_attachment( $upload );
 		return $this->custom_logo_id;
 	}
+
+	/**
+	 * @ticket 34292
+	 */
+	function test_wp_dns_prefetch() {
+		$this->assertEmpty( get_echo( 'wp_dns_prefetch' ) );
+
+		add_filter( 'dns_prefetch_domains', array( $this, '_add_dns_prefetch_domains' ) );
+
+		$expected = "<link rel='dns-prefetch' href='http://wordpress.org'>\r\n" .
+		            "<link rel='dns-prefetch' href='https://google.com'>\r\n" .
+		            "<link rel='dns-prefetch' href='//make.wordpress.org'>\r\n";
+
+		$this->assertEquals( $expected, get_echo( 'wp_dns_prefetch' ) );
+	}
+
+	function _add_dns_prefetch_domains( $domains ) {
+		$domains[] = 'http://wordpress.org';
+		$domains[] = 'https://google.com';
+		$domains[] = '//make.wordpress.org';
+
+		return $domains;
+	}
+
+	/**
+	 * @ticket 34292
+	 */
+	function test_wp_prerender() {
+		$this->assertEmpty( get_echo( 'wp_prerender' ) );
+
+		add_filter( 'prerender_urls', array( $this, '_add_prerender_urls' ) );
+
+		$expected = "<link rel='prerender' href='https://make.wordpress.org/great-again'>\r\n" .
+			    "<link rel='prerender' href='http://jobs.wordpress.net'>\r\n" .
+			    "<link rel='prerender' href='//core.trac.wordpress.org'>\r\n";
+
+		$this->assertEquals( $expected, get_echo( 'wp_prerender' ) );
+	}
+
+	function _add_prerender_urls( $urls ) {
+		$urls[] = 'https://make.wordpress.org/great-again';
+		$urls[] = 'http://jobs.wordpress.net';
+		$urls[] = '//core.trac.wordpress.org';
+
+		return $urls;
+	}
 }
