37

I just googled spring boot test redirect and the first result, this SO question with the title

Test HTTP status code of redirected URL with MockMvc

appears like this in the result page

enter image description here

The SO result appears with the title:

Not the answer you're looking for? Browse other questions tagged...

which is the usual <h2> element content at the bottom of the page.

6

1 Answer 1

21

Most likely this is due to SO abusing the <h2> tag to display

Not the answer you're looking for? Browse other questions tagged or ask your own question.

This makes Google believe that it is an actual section title on the page, and that title nicely matches your search criteria (“spring boot test redirect” – 3 out of 4 words) because it contains the question tags.

If you search for the question title, the search results show it properly with the exact same link:

Google search with exact title

4
  • Nice description of problem's origin. But not always someone knows exact title of question he is looking for. And this is sad. Commented Nov 17, 2018 at 15:14
  • @Dima This was just to show that Google adapts the link titles based on your search criteria, it's not supposed to represent an actual search 😉
    – Didier L
    Commented Nov 17, 2018 at 15:57
  • Oh, Didier L, yes, I got it when I've read your answer. And my comment wasn't about criticize your answer. Probably I had to insert some brackets in my first comment to empasize it)) Commented Nov 17, 2018 at 16:33
  • Ehm, the sentence is an actual section title on the page.
    – Mr Lister
    Commented Nov 18, 2018 at 8:10

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .