WordPress search seems to look into permalink (which is bad)

When we try searching for example.tld, then the default search query looks into the post title and content with:

  ... (wp_posts.post_title LIKE '%example.tld%') 
OR (wp_posts.post_content LIKE '%example.tld%') ...

When we add an attachment or a local link, into the post content, we normally get the full url, for example:

http://example.tld/wp-content/uploads/2015/05/image.jpg

so I would think that you’re just picking up those in your search.

Try for example to create a post with the title Test but without any post content and see if it shows up in your search results.