One of my pages inside blog has a page.header.link - a link to a special page that is not within blog (because it is modular with a header and sidebar. This works correctly when the page header in the list of pages is selected.
However, if the special page is found from the search box, the link fails.
I have fixed this on my site with a minor change to simplesearch_item.html.twig
Expanding
<div class="search-item">
<div class="search-title">
<h3><a href="{{ page.url }}">{{ page.title }}</a></h3>
</div>
to
<div class="search-item">
<div class="search-title">
{% if page.header.link %}
<h3><a href="{{base_url}}/{{ page.header.link }}">{{ page.title }}
</a></h3>
{% else %}
<h3><a href="{{ page.url }}">{{ page.title }}</a></h3>
{% endif %}
</div>
There may be more elegant ways, but this works for me.