311

I've seen questions edited to remove the language name from the title. Won't search engines - and folks using search engines - have an easier time finding them if these "tags" are kept as part of the title?

Return to FAQ index

1
  • 3
    Yes the main issue is people USING search engines which oddly is not addressed at all in the top rated answer. Can't believe so many people overlooked that. Having the tag missing from the title resulted in me opening results from google that I thought were about 'java' but were actually about 'javascript' many times. Having the main tag in the title would've prevented that.
    – Hasen
    Mar 16 at 0:44

2 Answers 2

262

TL;DR: No, it is not necessary to include "tags" in question titles.


Stack Exchange sites have an extensive tagging system which allows users to identify what subjects are involved in a question, watch or ignore certain subjects, narrow their searches to a specific area, and even learn about the tag's subject via its wiki.

This tag system works. You can rely on it to notify users who are interested in a tag about your question. Stack Exchange is optimized so that tags are indexed by search engines along with the content of the question. Users are guaranteed to be shown your tags, and will usually take them into account when answering your question.

As a matter of fact, the system automatically prepends the most commonly used tag to the question title when generating the page title (unless it's already in the question title somewhere) to help search engines find it more easily. (This doesn't happen on meta sites, but it doesn't matter since the most common tag is probably one of the four required tags anyway.)

Therefore, it is completely unnecessary to include tags in your question titles.

You absolutely do NOT have to use any one of the following forms when composing your title:

  • [tag]: [question title]
  • [question title] -- [tag] [tag] [tag]
  • [question title] in [tag]
  • [tag] [tag] [question title] [tag] [tag] [tag]
  • [tag] [tag] [tag] [tag] [tag] [tag] [tag] [tag]

The only time you should use tags in your title is when they are organic to the conversational tone of the title.

For example,

JavaScript, jQuery: When should I use one or the other?

is seen by many users as an attempt to force tags in order to compensate for a lousy title. The title would be much more well-received if rewritten like this:

Can I use plain JavaScript to foo the bar on the baz, or is my only choice to use jQuery?

15
  • 9
    Then why not enforce that when posting the question automatically? Put a warning that the questioner has to click away if the tag appears in the title Sep 25, 2016 at 14:05
  • 1
    Who argued against this? I think it's a good idea, you should add a feature-request for it. But make sure there aren't dupes, as it seems an obvious enough request.
    – user1228
    Sep 26, 2016 at 14:41
  • 51
    Except it doesn't work a) for Hot Network Questions, people click through, without any context at all, especially on popular or emotive topics. b) For external links, viewed outside SO (blog posts, Twitter, etc.). Again, the tag context isn't visible.
    – smci
    Nov 6, 2016 at 0:04
  • 28
    The SO tagging system isn't that good, and it's obvious that including more information (including words that happen to be tags) in the title is helpful. The idea that "Users are guaranteed to view your tags" is just flat-out wrong as @smci points out; I'm looking at this very SO page where there are plenty of plain titles without tags. Put tags in titles. It's just better. Jan 10, 2017 at 4:36
  • 1
    @JamesMoore it would be trivial to add the most popular tags to the link names automatically for hot network questions. You might want to FR that. However, I don't believe for a hot stinky second that anybody gives af about tags when looking at hot network questions. "Ooh, Difference between Nombro and Numero, I've wondered that myself. But, damnit, I just don't know if I should click through because they didn't force [grammar] into the title." Utter BS.
    – user1228
    Jan 10, 2017 at 13:45
  • @JamesMoore I didn't necessarily say that tags should be included in titles (when viewed externally), just that not doing it causes issues. HNQ is in particular a flashpoint, large numbers of new users thronging to a flashpoint question without understanding the context. Perhaps we don't show the more controversial HNQs to people with < 110 rep on that site. Or to people who start flamewars. By contrast auto-inserting tags for external search engines seems minor.
    – smci
    Jan 10, 2017 at 18:13
  • 7
    I don't think automatically inserting tags into titles is very useful because I think titles should almost always be worded to have the tags in them. Removing information from titles is a terrible idea. Personally, I think the HNQ section is awful and should go away completely (and I usually do it manually with an ad blocker), but it's the same for linked and related questions. The title should always have everything you need to know; tags are there to make life easier for searching, but they're a supplement that makes it easier to search, not a replacement. Jan 10, 2017 at 19:44
  • 1
    It would have saved me time if the last line of this answer were the first line instead, as all I wanted to know was "should I prefix my question java - like some of the other questions I see?"
    – Noumenon
    Oct 1, 2017 at 13:29
  • " or am I stuck using" conveys no information. Maybe the phrase is more pleasant for english readers but for others I think [tag,tag]: [short question title] is more straightforward and efficient.
    – frenchone
    Oct 17, 2018 at 14:00
  • How about [tag]-[question title] OR [tag][question title] ?
    – Ayman
    Oct 27, 2018 at 13:52
  • 4
    How about you just tell folks what your question is.
    – user1228
    Oct 29, 2018 at 13:09
  • 9
    I can't agree that the example re-write "Can I use jQuery to foo the bar on the baz, or is my only choice to use plain JavaScript?" would be a lot more received. I see it as a lot more of a mouthful, that will break into a second line. Whereas the original example, I don't see that as a lazy title at all, and can be quickly scanned by eye, and describes plainly what the question is: "JavaScript, jQuery: When should I use one or the other?". In fact, it takes effort to make a SHORTER message that communicates the same thing. Being super literal with lots of words is lazier, IMHO. Apr 10, 2019 at 2:30
  • 1
    Most people search for these kinds of things in google rather than stackoverflow so the tagging system is totally irrelevant. What matters is GOOGLE thus YES you should include the most important tag in the title as stated in the alternative answer. You haven't addressed the subject of google at all in your answer so clearly your answer is incorrect, despite the upvotes..
    – Hasen
    Mar 15 at 1:39
  • 1
    @Hasen "You haven't addressed the subject of google at all" Search engines have been addressed in the answer: "the system automatically prepends the most commonly used tag to the question title when generating the page title (unless it's already in the question title somewhere) to help search engines find it more easily." Mar 23 at 3:31
  • 1
    @galacticninja Google doesn't add that tag to it's results so it's kind of pointless. Google mainly goes by the actual title rather than the html header title. There are many comments about it and screenshots showing exactly that in the other answer to the question, so if you have a look below you'll learn more about the problem...
    – Hasen
    Mar 24 at 23:57
10

Yes, it is important to provide context in question titles. Tags are wonderful tools but they do NOT provide context in all situations, most notably:

The sidebar:

enter image description here

Imagine, if you will, that the use of "Python" in a question title is banned because, of course, it can be put in a tag. You would see a list of question titles like this:

  • How to print colored text?
  • Is there a ternary conditional operator?
  • How to print an exception? (etc.)

It can be extremely frustrating when a related question appears that seems to be exactly the answer you need.... only to find that it belongs to a different context, and it's actually something relevant to Scala or Clojure but not the Python context you want.

The "Similar questions" box when asking a new question

No tags shown.

enter image description here

The close-as-duplicate tool

No tags shown.

enter image description here

External websites

Google searches show titles but no tags. (Granted, you can add the tags to a search query to suggest context, but the results shown to you do not include tags.)

enter image description here


StackExchange should probably mitigate this within its own websites by including tags in the displayed results in the sidebar and in the Similar questions box and in the close-as-duplicate tool, the way it does for searches in SO (see below) but it cannot help in results outside of the StackExchange websites. There is little downside of including minimal context information in a title, in a readable way, so that it provides benefit to the reader in all circumstances. SO/SE users with the power to edit a title should be encouraged towards this approach, rather than the overbearing habit of removing context clues from a perfectly good title.

enter image description here

31
  • 1
    This is obviously the correct answer since it talks about google which is where pretty much everyone is actually gonna find their stackoverflow result on. Since you obviously don't LOSE anything by having the most important tag in the title it would make the most sense to leave it there.
    – Hasen
    Mar 15 at 1:40
  • 1
    @Hasen there are 15 answers deleted. Some attracted negative scores but many have positive scores such as one post with a score of140. Why so many were simultaneously deleted by two mods in two different moments is a bit baffling. Mar 16 at 5:49
  • 3
    This answer ignores that the guidance says about the "tag: question" format. You can, and should include enough information in your title. Note that the first result about metaclases, also include "python". If you want to know about generic metaclases, the wikipedia article is the first result and more useful than the specific implementation of the concept in any language.
    – Braiam
    Mar 16 at 13:34
  • @Braiam I think the problem is a lot of people editing questions don't understand what removing tags from titles means. It's more about a list of tags, not about removing the most important tag - ie PHP, Java etc. That's needed at least for google results if nothing else. It should be in there somewhere, even if it's reworded but many people editing questions simple delete it completely.
    – Hasen
    Mar 17 at 1:06
  • 2
    @Hasen You don't need to shohorneing it either, SO includes already the most popular tag into the title, like in this question. The title element includes "javascript", because it's in the tags. Prefer descriptive titles, Google is smart enough to pick up all the rest (in fact, it does read tags, title and body of the question and answers).
    – Braiam
    Mar 17 at 1:33
  • 2
    @Braiam i.imgur.com/wsFYL2N.png No the tag is not included in the title by google. The tag has been added to the title in that question, but clearly it doesn't always so better practise to add it. Google is not a person, it doesn't search, people do, and people need to know whether the result is about the language they searched for or not..even the top voted answer above does not suggest removing the main tag but rather rewording it. That's what so many people misunderstand and just blindly remove the main tag.
    – Hasen
    Mar 18 at 0:31
  • 1
    @Hasen of course, if it's already organically on the title, it will not be included. See here. Also "No the tag is not included in the title by google" who said that? I said "SO includes already the most popular tag into the title", I should have added "if it's not already included organically"
    – Braiam
    Mar 18 at 11:33
  • 1
    @Hasen of course the most popular tag will not always be the best one, which is why we should make only those that have higher chances of being useful popular and make sure is the one that it's always added: like the programming language, the animal, the program, the tool, etc. Generic tags that are more popular than useful tags are why you see such poor behavior. BTW, it's not a moot point, since on SO arrays is more popular than many language tags, and yet is the less useful, which is very bad.
    – Braiam
    Mar 19 at 11:14
  • 1
    BTW, your point is still wrong. It will be "[auto tag] - [manual tag] - actual title" which then makes the title unreadable on google since only the first 150 (I think?) characters are shown on search results. So, the problem you point out is valid, but your solution is actually worse.
    – Braiam
    Mar 19 at 11:16
  • 1
    @Hasen "The other results from my screenshot have the main tag manually added" I don't know what's happening there, since it is there, so manually adding it would yield the same results.
    – Braiam
    Mar 21 at 13:31
  • 2
    A simple check of a google search would indicate that this is still a problem; Google does not include any tag in its search results, just the question title. Example: google.com/search?q=heap+site%3Astackoverflow.com
    – Jason S
    Mar 23 at 4:42
  • 2
    @Hasen Nobody knows what's happening. Google, like other search engines before it, always showed the title element from the page in the search result. Now they are using something else, and that's bad for several reasons. Also, that still doesn't make your argument correct, both behaviors, Google's and writing horrible titles, should not happen. Titles are for humans to read, they shouldn't read like that. I haven't seen a book author write: c - programming - Learning C fast
    – Braiam
    Mar 23 at 18:51
  • 1
    I really don't care if the title is perfectly eloquent English, as long as I can distinguish a question quickly in a search and avoid the frustration of finding a result... and then realizing it is for another context than the one I'm interested in. Put the context in the title. When SO shows its "linked questions" along with tags, and Google shows SO titles with tags, then I'll quit complaining about it, but not until then.
    – Jason S
    Mar 24 at 20:57
  • 3
    @Hasen I am suggesting searching properly, i.e. including context in search when, well, searching. Expecting sites to go out of their way to tell you that something is about C# when you haven't specified you need C# is unreasonable. Also, the fact that SE's UI does not provide enough information is a reason to campaign for this information to be added rather than spending energy on a lost cause (it is officially against the guidelines to add tags in titles). And yes, I read the answer, and nothing is "explained perfectly" - the arguments made are weak at best. Mar 25 at 0:19
  • 2
    I also do not have anything more to say than the official guidelines already state, a compelling argument should be made by the one arguing against the status quo, of which I haven't seen any so far. If there is context missing inside the network, campaign to add it properly instead of band-aiding the problem, which covers points 1, 2, and 3 of the answer. Part 4 showcases a weak search query (not including the context the one is interested in, being Python here) and makes a statement that it's SE that should fix the query for them. Mar 26 at 22:52

You must log in to answer this question.