diff --git src/wp-includes/class-wp-rewrite.php src/wp-includes/class-wp-rewrite.php
index 035bbc3..8926a6c 100644
--- src/wp-includes/class-wp-rewrite.php
+++ src/wp-includes/class-wp-rewrite.php
@@ -1000,6 +1000,10 @@ class WP_Rewrite {
 			$feedmatch2 = $match . $feedregex2;
 			$feedquery2 = $feedindex . '?' . $query . '&feed=' . $this->preg_index($num_toks + 1);
 
+			// Create query and regex for embeds.
+			$embedmatch = $match . $embedregex;
+			$embedquery = $embedindex . '?' . $query . '&embed=true';
+
 			// If asked to, turn the feed queries into comment feed ones.
 			if ( $forcomments ) {
 				$feedquery .= '&withcomments=1';
@@ -1011,7 +1015,7 @@ class WP_Rewrite {
 
 			// ...adding on /feed/ regexes => queries
 			if ( $feed ) {
-				$rewrite = array( $feedmatch => $feedquery, $feedmatch2 => $feedquery2 );
+				$rewrite = array( $feedmatch => $feedquery, $feedmatch2 => $feedquery2, $embedmatch => $embedquery );
 			}
 
 			//...and /page/xx ones
diff --git src/wp-includes/post.php src/wp-includes/post.php
index 75850bc..aad6609 100644
--- src/wp-includes/post.php
+++ src/wp-includes/post.php
@@ -3574,7 +3574,7 @@ function wp_unique_post_slug( $slug, $post_ID, $post_status, $post_type, $post_p
 		 * @param bool   $bad_slug Whether the slug would be bad as an attachment slug.
 		 * @param string $slug     The post slug.
 		 */
-		if ( $post_name_check || in_array( $slug, $feeds ) || apply_filters( 'wp_unique_post_slug_is_bad_attachment_slug', false, $slug ) ) {
+		if ( $post_name_check || in_array( $slug, $feeds ) || 'embed' === $slug || apply_filters( 'wp_unique_post_slug_is_bad_attachment_slug', false, $slug ) ) {
 			$suffix = 2;
 			do {
 				$alt_post_name = _truncate_post_slug( $slug, 200 - ( strlen( $suffix ) + 1 ) ) . "-$suffix";
@@ -3604,7 +3604,7 @@ function wp_unique_post_slug( $slug, $post_ID, $post_status, $post_type, $post_p
 		 * @param string $post_type   Post type.
 		 * @param int    $post_parent Post parent ID.
 		 */
-		if ( $post_name_check || in_array( $slug, $feeds ) || preg_match( "@^($wp_rewrite->pagination_base)?\d+$@", $slug )  || apply_filters( 'wp_unique_post_slug_is_bad_hierarchical_slug', false, $slug, $post_type, $post_parent ) ) {
+		if ( $post_name_check || in_array( $slug, $feeds ) || 'embed' === $slug || preg_match( "@^($wp_rewrite->pagination_base)?\d+$@", $slug )  || apply_filters( 'wp_unique_post_slug_is_bad_hierarchical_slug', false, $slug, $post_type, $post_parent ) ) {
 			$suffix = 2;
 			do {
 				$alt_post_name = _truncate_post_slug( $slug, 200 - ( strlen( $suffix ) + 1 ) ) . "-$suffix";
@@ -3649,7 +3649,7 @@ function wp_unique_post_slug( $slug, $post_ID, $post_status, $post_type, $post_p
 		 * @param string $slug      The post slug.
 		 * @param string $post_type Post type.
 		 */
-		if ( $post_name_check || in_array( $slug, $feeds ) || $conflicts_with_date_archive || apply_filters( 'wp_unique_post_slug_is_bad_flat_slug', false, $slug, $post_type ) ) {
+		if ( $post_name_check || in_array( $slug, $feeds ) || 'embed' === $slug || $conflicts_with_date_archive || apply_filters( 'wp_unique_post_slug_is_bad_flat_slug', false, $slug, $post_type ) ) {
 			$suffix = 2;
 			do {
 				$alt_post_name = _truncate_post_slug( $slug, 200 - ( strlen( $suffix ) + 1 ) ) . "-$suffix";
diff --git src/wp-includes/query.php src/wp-includes/query.php
index ee0fc97..185b936 100644
--- src/wp-includes/query.php
+++ src/wp-includes/query.php
@@ -1456,6 +1456,7 @@ class WP_Query {
 			, 'title'
 			, 'fields'
 			, 'menu_order'
+			, 'embed'
 		);
 
 		foreach ( $keys as $key ) {
@@ -1756,6 +1757,10 @@ class WP_Query {
 		if ( '' != $qv['feed'] )
 			$this->is_feed = true;
 
+		if ( '' != $qv['embed'] ) {
+			$this->is_embed = true;
+		}
+
 		if ( '' != $qv['tb'] )
 			$this->is_trackback = true;
 
@@ -1788,6 +1793,9 @@ class WP_Query {
 			// pagename can be set and empty depending on matched rewrite rules. Ignore an empty pagename.
 			if ( isset($_query['pagename']) && '' == $_query['pagename'] )
 				unset($_query['pagename']);
+
+			unset( $_query['embed'] );
+
 			if ( empty($_query) || !array_diff( array_keys($_query), array('preview', 'page', 'paged', 'cpage') ) ) {
 				$this->is_page = true;
 				$this->is_home = false;
@@ -1859,7 +1867,7 @@ class WP_Query {
 		if ( '404' == $qv['error'] )
 			$this->set_404();
 
-		$this->is_embed = isset( $qv['embed'] ) && ( $this->is_singular || $this->is_404 );
+		$this->is_embed = $this->is_embed && ( $this->is_singular || $this->is_404 );
 
 		$this->query_vars_hash = md5( serialize( $this->query_vars ) );
 		$this->query_vars_changed = false;
diff --git src/wp-includes/rewrite.php src/wp-includes/rewrite.php
index 7f3b2ed..b867cdc 100644
--- src/wp-includes/rewrite.php
+++ src/wp-includes/rewrite.php
@@ -445,13 +445,6 @@ function url_to_postid( $url ) {
 			return $id;
 	}
 
-	// Check to see if we are using rewrite rules
-	$rewrite = $wp_rewrite->wp_rewrite_rules();
-
-	// Not using rewrite rules, and 'p=N' and 'page_id=N' methods failed, so we're out of options
-	if ( empty($rewrite) )
-		return 0;
-
 	// Get rid of the #anchor
 	$url_split = explode('#', $url);
 	$url = $url_split[0];
@@ -471,6 +464,21 @@ function url_to_postid( $url ) {
 	if ( false === strpos(home_url(), '://www.') )
 		$url = str_replace('://www.', '://', $url);
 
+	if ( trim( $url, '/' ) === home_url() && 'page' == get_option( 'show_on_front' ) ) {
+		$page_on_front = get_option( 'page_on_front' );
+
+		if ( $page_on_front && get_post( $page_on_front ) instanceof WP_Post ) {
+			return (int) $page_on_front;
+		}
+	}
+
+	// Check to see if we are using rewrite rules
+	$rewrite = $wp_rewrite->wp_rewrite_rules();
+
+	// Not using rewrite rules, and 'p=N' and 'page_id=N' methods failed, so we're out of options
+	if ( empty($rewrite) )
+		return 0;
+
 	// Strip 'index.php/' if we're not using path info permalinks
 	if ( !$wp_rewrite->using_index_permalinks() )
 		$url = str_replace( $wp_rewrite->index . '/', '', $url );
diff --git tests/phpunit/tests/oembed/controller.php tests/phpunit/tests/oembed/controller.php
index 5cca696..9aa1524 100644
--- tests/phpunit/tests/oembed/controller.php
+++ tests/phpunit/tests/oembed/controller.php
@@ -169,6 +169,53 @@ class Test_oEmbed_Controller extends WP_UnitTestCase {
 		$this->assertTrue( $data['width'] <= $request['maxwidth'] );
 	}
 
+	/**
+	 * @ticket 34971
+	 */
+	function test_request_static_front_page() {
+		$show_on_front = get_option( 'show_on_front' );
+		$page_on_front = get_option( 'page_on_front' );
+
+		$post = self::factory()->post->create_and_get( array(
+			'post_title' => 'Front page',
+			'post_type'  => 'page',
+		) );
+
+		update_option( 'show_on_front', 'page' );
+		update_option( 'page_on_front', $post->ID );
+
+		$request = new WP_REST_Request( 'GET', '/oembed/1.0/embed' );
+		$request->set_param( 'url', home_url() );
+		$request->set_param( 'maxwidth', 400 );
+
+		$response = $this->server->dispatch( $request );
+		$data     = $response->get_data();
+
+		$this->assertInternalType( 'array', $data );
+		$this->assertNotEmpty( $data );
+
+		$this->assertArrayHasKey( 'version', $data );
+		$this->assertArrayHasKey( 'provider_name', $data );
+		$this->assertArrayHasKey( 'provider_url', $data );
+		$this->assertArrayHasKey( 'author_name', $data );
+		$this->assertArrayHasKey( 'author_url', $data );
+		$this->assertArrayHasKey( 'title', $data );
+		$this->assertArrayHasKey( 'type', $data );
+		$this->assertArrayHasKey( 'width', $data );
+
+		$this->assertEquals( '1.0', $data['version'] );
+		$this->assertEquals( get_bloginfo( 'name' ), $data['provider_name'] );
+		$this->assertEquals( get_home_url(), $data['provider_url'] );
+		$this->assertEquals( get_bloginfo( 'name' ), $data['author_name'] );
+		$this->assertEquals( get_home_url(), $data['author_url'] );
+		$this->assertEquals( $post->post_title, $data['title'] );
+		$this->assertEquals( 'rich', $data['type'] );
+		$this->assertTrue( $data['width'] <= $request['maxwidth'] );
+
+		update_option( 'show_on_front', $show_on_front );
+		update_option( 'page_on_front', $page_on_front );
+	}
+
 	function test_request_xml() {
 		$user = self::factory()->user->create_and_get( array(
 			'display_name' => 'John Doe',
diff --git tests/phpunit/tests/oembed/discovery.php tests/phpunit/tests/oembed/discovery.php
index 63eb5bb..f3d5e2c 100644
--- tests/phpunit/tests/oembed/discovery.php
+++ tests/phpunit/tests/oembed/discovery.php
@@ -47,4 +47,30 @@ class Tests_oEmbed_Discovery extends WP_UnitTestCase {
 
 		$this->assertEquals( $expected, get_echo( 'wp_oembed_add_discovery_links' ) );
 	}
+
+	/**
+	 * @ticket 34971
+	 */
+	function test_add_oembed_discovery_links_static_front_page() {
+		$show_on_front = get_option( 'show_on_front' );
+		$page_on_front = get_option( 'page_on_front' );
+
+		$page_id = self::factory()->post->create( array( 'post_type' => 'page' ) );
+
+		$this->assertSame( 0, url_to_postid( home_url() ) );
+
+		update_option( 'show_on_front', 'page' );
+		update_option( 'page_on_front', $page_id );
+
+		$this->go_to( home_url() );
+		$this->assertQueryTrue( 'is_front_page', 'is_singular', 'is_page' );
+
+		$expected = '<link rel="alternate" type="application/json+oembed" href="' . esc_url( get_oembed_endpoint_url( get_permalink() ) ) . '" />' . "\n";
+		$expected .= '<link rel="alternate" type="text/xml+oembed" href="' . esc_url( get_oembed_endpoint_url( get_permalink(), 'xml' ) ) . '" />' . "\n";
+
+		$this->assertEquals( $expected, get_echo( 'wp_oembed_add_discovery_links' ) );
+
+		update_option( 'show_on_front', $show_on_front );
+		update_option( 'page_on_front', $page_on_front );
+	}
 }
diff --git tests/phpunit/tests/oembed/postEmbedUrl.php tests/phpunit/tests/oembed/postEmbedUrl.php
index dda0f3c..c38a249 100644
--- tests/phpunit/tests/oembed/postEmbedUrl.php
+++ tests/phpunit/tests/oembed/postEmbedUrl.php
@@ -21,6 +21,29 @@ class Tests_Post_Embed_URL extends WP_UnitTestCase {
 		update_option( 'permalink_structure', '' );
 	}
 
+	/**
+	 * @ticket 34971
+	 */
+	function test_get_post_embed_url_static_front_page() {
+		$show_on_front = get_option( 'show_on_front' );
+		$page_on_front = get_option( 'page_on_front' );
+
+		update_option( 'permalink_structure', '/%postname%' );
+
+		$post_id = self::factory()->post->create( array( 'post_type' => 'page' ) );
+
+		update_option( 'show_on_front', 'page' );
+		update_option( 'page_on_front', $post_id );
+
+		$embed_url = get_post_embed_url( $post_id );
+
+		$this->assertEquals( user_trailingslashit( trailingslashit( home_url() ) . 'embed' ), $embed_url );
+
+		update_option( 'show_on_front', $show_on_front );
+		update_option( 'page_on_front', $page_on_front );
+		update_option( 'permalink_structure', '' );
+	}
+
 	function test_get_post_embed_url_with_ugly_permalinks() {
 		$post_id   = self::factory()->post->create();
 		$permalink = get_permalink( $post_id );
@@ -28,4 +51,24 @@ class Tests_Post_Embed_URL extends WP_UnitTestCase {
 
 		$this->assertEquals( $permalink . '&embed=true', $embed_url );
 	}
+
+	/**
+	 * @ticket 34971
+	 */
+	function test_get_post_embed_url_static_front_page_with_ugly_permalinks() {
+		$show_on_front = get_option( 'show_on_front' );
+		$page_on_front = get_option( 'page_on_front' );
+
+		$post_id = self::factory()->post->create( array( 'post_type' => 'page' ) );
+
+		update_option( 'show_on_front', 'page' );
+		update_option( 'page_on_front', $post_id );
+
+		$embed_url = get_post_embed_url( $post_id );
+
+		$this->assertEquals( trailingslashit( home_url() ) . '?embed=true', $embed_url );
+
+		update_option( 'show_on_front', $show_on_front );
+		update_option( 'page_on_front', $page_on_front );
+	}
 }
diff --git tests/phpunit/tests/post/wpUniquePostSlug.php tests/phpunit/tests/post/wpUniquePostSlug.php
index 354997e..2296510 100644
--- tests/phpunit/tests/post/wpUniquePostSlug.php
+++ tests/phpunit/tests/post/wpUniquePostSlug.php
@@ -302,4 +302,49 @@ class Tests_Post_WpUniquePostSlug extends WP_UnitTestCase {
 		$found = wp_unique_post_slug( '32', $p, 'publish', 'post', 0 );
 		$this->assertEquals( '32', $found );
 	}
+
+	/**
+	 * @ticket 34971
+	 */
+	public function test_embed_slug_should_be_suffixed_for_posts() {
+		$this->set_permalink_structure( '/%postname%/' );
+
+		$p = self::factory()->post->create( array(
+			'post_type' => 'post',
+			'post_name' => 'embed',
+		) );
+
+		$found = wp_unique_post_slug( 'embed', $p, 'publish', 'post', 0 );
+		$this->assertEquals( 'embed-2', $found );
+	}
+
+	/**
+	 * @ticket 34971
+	 */
+	public function test_embed_slug_should_be_suffixed_for_pages() {
+		$this->set_permalink_structure( '/%postname%/' );
+
+		$p = self::factory()->post->create( array(
+			'post_type' => 'page',
+			'post_name' => 'embed',
+		) );
+
+		$found = wp_unique_post_slug( 'embed', $p, 'publish', 'paage', 0 );
+		$this->assertEquals( 'embed-2', $found );
+	}
+
+	/**
+	 * @ticket 34971
+	 */
+	public function test_embed_slug_should_be_suffixed_for_attachments() {
+		$this->set_permalink_structure( '/%postname%/' );
+
+		$p = self::factory()->post->create( array(
+			'post_type' => 'attachment',
+			'post_name' => 'embed',
+		) );
+
+		$found = wp_unique_post_slug( 'embed', $p, 'publish', 'attachment', 0 );
+		$this->assertEquals( 'embed-2', $found );
+	}
 }
diff --git tests/phpunit/tests/rewrite.php tests/phpunit/tests/rewrite.php
index 1f7426e..3df47fb 100644
--- tests/phpunit/tests/rewrite.php
+++ tests/phpunit/tests/rewrite.php
@@ -304,6 +304,30 @@ class Tests_Rewrite extends WP_UnitTestCase {
 	}
 
 	/**
+	 * @ticket 34971
+	 */
+	function test_url_to_postid_static_front_page() {
+		$show_on_front = get_option( 'show_on_front' );
+		$page_on_front = get_option( 'page_on_front' );
+
+		$post_id = self::factory()->post->create( array( 'post_type' => 'page' ) );
+
+		$this->assertSame( 0, url_to_postid( home_url() ) );
+
+		update_option( 'show_on_front', 'page' );
+		update_option( 'page_on_front', $post_id );
+
+		$this->assertSame( $post_id, url_to_postid( set_url_scheme( home_url(), 'http' ) ) );
+		$this->assertSame( $post_id, url_to_postid( set_url_scheme( home_url(), 'https' ) ) );
+		$this->assertSame( $post_id, url_to_postid( str_replace( array( 'http://', 'https://' ), 'http://www.', home_url() ) ) );
+		$this->assertSame( $post_id, url_to_postid( home_url() . '#random' ) );
+		$this->assertSame( $post_id, url_to_postid( home_url() . '?random' ) );
+
+		update_option( 'show_on_front', $show_on_front );
+		update_option( 'page_on_front', $page_on_front );
+	}
+
+	/**
 	 * @ticket 21970
 	 */
 	function test_parse_request_with_post_slug_that_clashes_with_a_trashed_page() {
