Forum Moderators: phranque
<form role="search" method="get" class="search-form" action="<?php echo esc_url( home_url( '/' ) ); ?>">
<label>
<span class="screen-reader-text"><?php echo esc_html_x( 'Search for:', 'label', 'gridbox' ); ?></span>
<input type="search" class="search-field"
placeholder="<?php echo esc_attr_x( 'Search …', 'placeholder', 'gridbox' ); ?>"
value="<?php echo esc_html( get_search_query() ); ?>" name="s"
title="<?php echo esc_attr_x( 'Search for:', 'label', 'gridbox' ); ?>" />
</label>
<button type="submit" class="search-submit">
<?php echo gridbox_get_svg( 'search' ); ?>
<span class="screen-reader-text"><?php echo esc_html_x( 'Search', 'submit button', 'gridbox' ); ?></span>
</button>
</form> @type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://example.com/?s={search_term_string}"},"query-input":"required name=search_term_string"}] URLs that contain a form element with the method set to GET, which creates submission URLs with the form data in the query string. This presents a potential vulnerability for a large number of URLs to be created and/or cached, which could cause issues with crawl efficiency or index bloat
https://example.com/page/3?s={search_term_string}/page/7/page/10/page/2/page/10/page/10/page/10/page/3/page/10
https://example.com/tag/egg?s=search_term_string
https://example.com/?s={search_term}/page/10
https://example.com/page/8?s=/page/1 <form role="search" method="get" class="search-form" rel="nofollow" action="<?php echo esc_url( home_url( '/' ) ); ?>"> [edited by: phranque at 11:51 pm (utc) on May 5, 2022]
[edit reason] exemplified urls [/edit]
should i modified the search function into something lik this (add nofollow rel)
<form role="search" method="POST" class="search-form" action="<?php echo esc_url( home_url( '/' ) ); ?>"> does my excluded coverage is caused by the search form and schema JSON above?
does blocking robot with Disallow: /*?* is the correct approach?
the correct answer actually depends on the difference in the content displayed between the url with a search query string vs without a query string.
https://example.com/tag/egg?s vs https://example.com/tag/egg?amp https://example.com/tag/egg?amp
https://example.com/tag/egg one URL having ?s ended up as a search result page with no-index tag
https://example.com/search?s=search-term https://example.com/whatever/this/url/is?s=search-term You could disallow crawling of /?s= for search queries ...
wouldn't this still count toward "excluded index coverage"?You want that content to be excluded because it serves the same content as you have at other URLs. The site is a WordPress site from all indications so the same content is served up at multiple URLs if you permit indexing of all versions. The Search results are not static, unique pages, especially with the /tag/ syntax. Tags are arbitrary terms that you can connect to your content (pages or posts) and helps with search, but you don't want those indexed. In WP you select what you want to use for permalinks and those are what should be on the sitemap. Google understands WP and has no problem ignoring /tag/ and /archive/ or even /category/ URLs.
You want that content to be excluded because it serves the same content as you have at other URLs.