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
  • 42
    Could be worse. Commented Nov 15, 2018 at 12:28
  • 4
    @PaulCrovella that guy was onto something... Commented Nov 15, 2018 at 12:53
  • 3
    meta.stackexchange.com/questions/245666/… Commented Nov 15, 2018 at 13:11
  • @PaulCrovella awesome... Commented Nov 16, 2018 at 14:32
  • 2
    Was it the answer you were looking for? Commented Nov 16, 2018 at 20:58
  • I am so disappointed that the question causing this wasn't about Android... Commented Nov 18, 2018 at 2:35

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 😉 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. Commented Nov 18, 2018 at 8:10

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.