A good title helps your question get the attention it deserves. What goes into a good title?

Return to FAQ index

  • 14
    Great! Thanks to SO's overzealous checking, it is now impossible to ask a question with "Halting Problem" in the title. Apr 2 '14 at 22:10
  • 4
    Attempted to create "Win2012r2 Services Recovery Tab Help refuses to ... well HELP." but ServerFault rejected with an error box pointing me here. "× These words are not allowed in titles: 'HELP.'.. See Writing Good Titles." So what does one do when Windows Help is broken? Searched this long webpage for "help" and "allowed" but google-chrome did not find any relevant references.
    – rjt
    Jun 21 '16 at 22:30
  • @rjt, I just ran into this same thing while asking a question about ABAP Dictionary Search Helps.
    – gkubed
    Nov 30 '18 at 15:39

1. Make the topic stand out.

The purpose of a title is to attract people interested in your topic or who can give you an answer. People scan web pages quickly; make it easy for them to notice your question and understand what your question is about. Also keep in mind that some people may read questions via the RSS feed (Stack Overflow example), so they won't see tags.

2. Make it descriptive, but also to the point.

Make sure you describe your question or problem well enough so that readers get the gist of what it's about ("Problem with Java function" is not very descriptive). However, don't put every detail in your title... that's what the question body is for. Make your title descriptive, but also succinct.

For example, these articles discuss how people read web pages, based on using an eye tracking system to monitor users. For Stack Overflow-like pages, people read most of the first and second entries (the bars of the "F"), and then scan down the rest of the list, reading on average the first 16 characters of each line.

Reading Heatmap

3. Use proper grammar and write in question form.

Make sure you spell words completely and correctly, and form your titles in a way that they make sense to people reading them.

Likewise, expert opinion, Meta consensus, and Stack Overflow's Help Center describe how titles written with proper grammar, and in an interrogative form, are preferred.

4. Don't sweat replicating a tag keyword—if necessary.

The tags are orthogonal to the title. You may have to describe a part of your title using words that are already applied from your tags in order to distinguish your question from others and avoid confusion/ambiguity.

However, don't explicitly add tags to the title for their own sake. For example, don't start your title with a tag. See this post for a more detailed discussion of the relationship between tags and titles.

Some Good Examples

Here are some good titles, taken from the highest scoring posts across top sites.

Each of these summarizes the question adequately without introduce fluff or unnecessary verbiage, and, critically, provide context for exactly what the asker's question will be.
(Note that some questions are from very topic-specific sites like Ask Ubuntu or Physics)

  • Why is it faster to process a sorted array than an unsorted array?
  • Can I compute the mass of a coin based on the sound of its fall?
  • What is the cURL command-line syntax to do a POST request?
  • How do I undo the most recent commits in Git?
  • Is there a correct gender-neutral singular pronoun (“his” vs. “her” vs. “their”)?
  • How to unzip a zip file from the Terminal?
  • How do I install a .deb file via the command line?
  • How to determine if a bash variable is empty?
  • Why don't metals bond when touched together?
  • How do I deal with a compromised server?
  • In what order should the Star Wars movies be watched?
  • How to get bash or ssh into a running container in background mode?
  • How does IPv4 Subnetting Work?
  • How to upgrade a single package using apt-get?

Some Bad Examples

These titles, also taken from existing, poorly scored posts, are constructed of fragments, don't describe anything about the question, or lack useful context for what the asker's question actually is:

  • Please help me!
  • Python : Need Help About Statistics
  • PostgreSQL encrypted backups
  • Why it works like this?
  • About Computer Architecture
  • Constructing images using HTML markup?
  • DNS resolvation of a URL
  • Combine letter and numbers
  • PHP - Passing variables
  • BackgroundImage in css
  • Map Routing, a la Google Maps?
  • MySQL - Error In SQL Syntax
  • I can t write in pascal expression
  • 64-bit XML-RPC values?
  • Turning Linux USB power on and off?

5. Finally, be flexible

Different questions benefit from different styles of titles. Applying any single hard and fast rule is probably a mistake.

  • 94
    I can't vote on individual parts of the post (perhaps you should look at posting each idea separately?) but as for the titles - DON'T put tags in the titles - that's what the tags are for!
    – a_m0d
    Jul 29 '09 at 7:03
  • 6
    If you look at the titles that are posted, you will notice that most titles already include one or more keywords. As an exercise, pick a question about some topic (Django, for example). You can find these easily by selecting the Django tag. You will see almost all of them have "Django" in the title. (And most of the ones that do not would benefit from it, lol!) Jul 29 '09 at 7:32
  • 91
    If your question is How do I do X in Django?, should you put the tile How do I do X, and tag it Django? I think not, in that case the Django is an important part of the question, so put it in the title and tag it Django. Sometimes a little redundancy is not a bad thing...
    – Treb
    Jul 29 '09 at 7:59
  • 7
    I don't think there's a simple anwser here. Titles should do what they do in pretty much any form of written information; act as a simple summary of the related content. People should be able to scan past your question, and quickly get a feel for what it's about. I don't know if you need to be any more specific than that. Sometimes that means you'll repeat tags in the title. Jul 29 '09 at 8:01
  • 6
    Ok, better even: Django: How do I do X?...
    – Treb
    Jul 29 '09 at 8:02
  • 17
    @a_mod, Jeff's point of view when he wrote is "You're supposed to look at the tags to tell what a question is". My point of view is "people don't always do what the site creator intends... and here's how to work with people's observed reading patterns to get your question viewed." Jul 29 '09 at 9:08
  • 5
    @Mark Harrison: you might consider posting a suggestion that tags be included in the feed titles, rather than suggesting that users do so manually for the benefit of those who don't already subscribe to tag-specific feeds.
    – Shog9
    Sep 19 '09 at 5:21
  • 16
    Writing tags in titles is redundant. We already have a tagging system that is clear, concise, consistent and indexable. All you're doing by writing, say, a pointless Python: at the start of your title is breaking SO's expectations (look in your titlebar), adding messy noise to your title, and winding me up. The "title" field is so named for a reason! Write the title, not some "topic". Nothing more, nothing less. SO is not a message board or chat forum. Jul 23 '11 at 14:27
  • 21
    I don't understand why people have problems with the phrasing "How do I?", since that is still a question, and many, many questions can be phrased just fine that way. Aug 29 '11 at 17:50
  • 19
    Needs less tag prefixes.
    – Shog9
    Aug 29 '11 at 23:07
  • 27
    Almost all of your "good" examples end with a question mark but aren't a question. We're a question and answer site, and without a question, this looks really weird. Also don't forget that an actual question in the title reads more fluently, catches the eye when posted as links (e.g. to Twitter, as blog posts, on Hacker News, etc.).
    – slhck
    May 19 '12 at 7:37
  • 11
    I don't see anything even vaguely confusing about the so-called bad examples. And since the author of this answer only offers a vague explanation as to why they think they're bad, the answer is itself even worse than unhelpful. Jun 29 '13 at 9:21
  • 5
    Adding to the bad example list, possibly taking the #1 spot: "Hi i have question that keeps bothering me and i dont know if its stupid to ask this..but could you guys help me"
    – Jason C
    Nov 5 '14 at 5:45
  • 9
    A lot of the comments and real world titles have shown how poor most of those "good" title actually are. Being a part of an FAQ, answers are subject to being edited for accuracy over time, not as a glaring hole of how wrong things are
    – random
    Feb 2 '15 at 13:17
  • 12
    @MarkHarrison This post is severely outdated and no longer true. A lot of your good examples are in fact very bad examples of question titles for our network, by today's standards. Your answer received a bit of attention because it was brought up on Meta Stack Overflow that it's being linked in a notice and giving users bad advice.
    – animuson StaffMod
    Feb 3 '15 at 16:18

While this is overall an excellent set of advice, I have some issues with a few of the titles:

  • Oracle: formatting number as xxx-xx-xxxx
  • Linux USB: turning the power on and off?
  • Oracle: how to UPSERT (update or insert into a table)?
  • Python: What OS am I running on?
  • X11: raise an existing window via command line?
  • XML-RPC: best way to handle 64-bit values?
  • X11: move an existing window via command line?
  • SQL: sum 3 columns when one column has a null value?
  • Oracle: best way to search over a range of values?
  • HTML: Constructing images using markup?
  • Postgresql: Inserting BLOBs at a high-rate?

I am not sure the rigid format

Tag: Question Title

Is a good one. The starts-with-tag-colon convention is a bit artificial and should be tweaked. Here's what I'd rather see:

  • formatting number as xxx-xx-xxxx in Oracle?
  • turning the USB power on and off in Linux?
  • how to UPSERT in Oracle?
  • raise an existing X11 window via command line?
  • best way to handle 64-bit values in XML-RPC?
  • move an existing X11 window via command line?
  • sum 3 columns in SQL when one column has a null value?
  • Best way to search over a range of values in Oracle?
  • Constructing images using HTML markup?
  • Inserting BLOBs at a high-rate in PostgreSQL?
  • What OS am I running on? (tagged Python)

(obviously all these questions would also be tagged with the right keywords)

To be clear, I think it is fine to duplicate the tags in the title, but only when they can be worked into the titles organically and conversationally.

If we're ritualistically appending tags to the front of the title, that doesn't feel like a tremendous improvement over a bunch of "How do I..." titles in the system, to me.

  • 3
    I don't like too the rigid formatting where a question have to start with the tag/technology, I prefer the discursive form.
    – Drake
    Jul 29 '09 at 8:44
  • 3
    The tag issue is interesting. I read a lot of SO via an RSS feed which does not show tags, and this probably has shaped my opinion somewhat. Sep 2 '09 at 6:12
  • 1
    Why would you rather see the “suffix” format? I prefer the prefix format because it means “Oracle” is the first word I see, so I can immediately skip the question, or “Python” is the first word I see, so I can pay more attention to the question (without having to visually parse the smaller “tags”). Mar 24 '11 at 17:43
  • Or to put it another way: I think everyone agrees that “How can I format a number as xxx-xxx-xxx?” is a bad title… So why is the “question domain” (or “most relevant tag”?) more appropriate as a suffix (or inline) rather than a prefix? Mar 24 '11 at 17:46
  • 13
    Writing the name of the technology into the title at all is completely redundant. Writing it as a pseudo-fixed-format "tag" is even worse. It comes from the days when categorisation was done on message boards without apt categorisation systems. SO has a consistent, indexable tagging system. There is utterly no need for writing tags in titles, at the start, middle or end, and it should be stamped out! Jul 9 '11 at 23:19
  • 3
    Much agreed, I'm not a fan of prefixing the title. I tend to browse by tag, and if I'm interested by a title, I'll read the tags anyway. Jul 20 '11 at 14:57


The Good

Your title should be, in order of greatest to least importance:

  • Searchable. The point of Stack Exchange is not only to help the asker, but to others who may have the same problem as well in the future.
  • Descriptive. A searcher would like to know whether the question is another one of those "How to write a HTML regex parser?" questions or actually the "Why is parsing HTML with regexes a bad idea?" they are looking for.
  • Short. Put your 10-page essay in the post, not the title.
  • Precise. Tell us in
    • as few words as possible
    • as much as possible.
  • Interesting. How else will you make the Hot Questions list?

These points go together hand in hand. For example, a short and descriptive title is always searchable.

The Bad

Your title should not be/contain:

  • Programming language names. I do not need to see "How to fly using Python?". I can just check the tags for the . This is redundant information which just takes up ~20% extra of the question title. Additionally, Google search results already say "python - How to fly?"
  • Funny. Try not to be funny just for the sake of being funny. I am guilty of this too. If you excuse me, I will go have a serious conversation with Mr. Struct.
  • Ambiguous.
    • "Is this code OK?" If your question wasn't about code, you wouldn't be posting it here!
    • "Help with programming problem" This tells us nothing that we couldn't infer from the very fact that you're posting here.
    • "Help with homework problem plz" But fortunately, certain keywords are automatically rejected.


The Good

Single word requests, crosswords, and the fight against mediocrity
TortoiseHg Push
RegEx match open tags except XHTML self-contained tags
Why is subtracting these two times (in 1927) giving a strange result?
Is it possible to serve HTML pages with ServiceStack?
How to deep copy an irregular 2D array

The Bad

How Should Titles Be Capitalized?
Memory and Mr. Struct
How to use a struct in C?
C Programming. How to deep copy a struct?
How do you make a deep copy of an object in Java? (Any question containing the word 'Java' should be deleted, and its asker banned.)

The Ugly

Regular Expression…sql replace

  • White-space has to be added after the first link at the The Good section, so that the next link is also correctly highlighted. I don't have permissions to improve the post, hence a comment.
    – Rob W
    Nov 20 '11 at 16:26
  • @RobW Thanks. :) You should have editing privileges (even 'non-users' do), but they have to be substantial (6 non-whitespace characters) and approved by a high-rep user. Nov 21 '11 at 0:50
  • 4
    @menutoo I'm sorry but I can see why this wasn't the accepted answer! I have to completely disagree with you when you say that you should not put the programming language or any tag in the title. The good examples that you provided, for me are horrible and I hate questions that don't contain the programming language in the one. Looking at the tags is a pain most of the time, if the tags are even displayed, which they aren't on search engines and RSS feeds! Seeing 'Java' or 'Python' at the start of the big bold title that people read first is much easier and preferably
    – Andy
    Jan 29 '12 at 15:34
  • 3
    If I were going to answer a question, and baring in mind that hundreds get asked ever hour, it would much easier for me to determine if I could answer the question if the programming language was in the title. I'm not saying all tags should be put into the title, or tags are of no use whatsoever because they are great - when they are available to see, which in some cases they are not. I also think your reaction to titles containing the word 'Java' is a little uncalled for. Why do you hate them so much?
    – Andy
    Jan 29 '12 at 15:41
  • 4
    @Andy Personally, I find it quicker to look at the tag. BTW, have you ever tried using the favorite/ignored tags feature? That way, there's not as much of a need to look at the tag, but just the title. And the page is already titled "tag - title", so Google would display the language twice, redundantly. If you want it so that SO displays "tag - title" on the homepage -- that's a feature request you can make, although personally, I would not like that. Repeating the same information over and over, however, is definitely wrong. Jan 29 '12 at 23:25
  • @muntoo I do use the favourite/ignored tag feature on SO and I agree that it is very useful - that's why I was very careful to say that tags aren't of any use whatsoever. However, my points still apply. Maybe search engines were a bad example, but certainly for things like RSS feeds putting the programming language in the question can be helpful. Also, and I know it's not a very strong argument, a prime example of when the programming language or similar would be more convenient is your 'Good Examples' of titles. To someone looking at links on a web page, that may not full explain the...
    – Andy
    Jan 30 '12 at 16:53
  • 1
    content on the destination web page, those title are completely useless. Now, I know this situation is not likely to occur very often but it's still a point! Finally, and the main point that Mark also picks up on is the fact that the title is one of the first things that a user looks at on the page, so I would argue that it should be articulate as possible, and at least contain the programming language, if the question regards programming! You still haven't answered by question though, why are you targeting Java so much in perticular?
    – Andy
    Jan 30 '12 at 16:56

(Jeff raises some good points. This is a followup to his note, since I can't edit his post, and I need a bit more formatting that what a comment provides.)

  1. Absolutely correct about rigidly adhering to a formula for titles. Do what makes sense.
  2. I didn't realize I had picked so many topic: lines. There are certainly other ways to write good questions.

  3. Many of Jeff's alternative are fine titles when considered in isolation.

However, if you want people to pick out your post from a list of other titles all competing for reader attention, it pays to note that the people in the study were scanning on average the first 16 characters of the titles.

So, it's interesting to truncate your title to 16 characters and see how they hold up. If you put something that interests a reader in the first 16 characters, there's a pretty good chance the rest of your title will be read. Once someone has clicked through to your question it's almost assured your question will be read. The main job of the title on the questions page is to get the reader that far.

  • formatting numbe
  • turning the USB
  • how to UPSERT in
  • raise an existin
  • best way to hand
  • move an existing
  • sum 3 columns in
  • Best way to sear
  • Constructing ima
  • Inserting BLOBs
  • What OS am I run

  • Oracle: formatti

  • Linux USB: turni
  • Oracle: how to U
  • Python: What OS
  • X11: raise an ex
  • XML-RPC: best wa
  • X11: move an exi
  • SQL: sum 3 colum
  • Oracle: best way
  • HTML: Constructi
  • Postgresql: Inse
  • Python: What OS
  • 2
    Tags on questions help with the scanning. Plus, with the ignore feature, irrelevant topics are faded of squeezed out of eyeball attention. Not all programmers and sysadmins have ADHD do they?
    – random
    Jul 29 '09 at 9:02
  • 11
    I'd argue you should be interested in the TOPIC more than the technology. In other words, a proper cross join and string formatting is not Oracle specific. Part of the intent of Stack Overflow is to rub shoulders with people in related disciplines and realize that, hey, we have stuff in common! Less reason to hate {not my technology stack}. Jul 29 '09 at 9:08
  • 6
    that said, I just want to reiterate that the word Oracle should be in the title, but the cross-platform, cross-discipline nature of SO does not require that it be at the beginning. Jul 29 '09 at 9:09
  • Jeff, both good points. And +1 for noting that people who spell "SQL" as "Oracle" are probably depriving themselves of some good information. Jul 29 '09 at 9:12
  • 1
    Topic focus is good, but it does help if you narrow out platforms/tech you have no idea about or just aren't in your field of vision for the time being. Getting dirty with the other tags is great, but some of us tepid array walkers like to play with the other tags one at time after we're comfortable being horrible in our first coding language.
    – random
    Jul 29 '09 at 9:16
  • 6
    interestingly, Google forced our hand on this, so the de-facto default is "TAG - Title" unless the tag does appear organically in the title. See webmasters.stackexchange.com/questions/6556/… Jan 10 '11 at 8:33
  • That's very funny, to be justified by Google. I'll be sure and mention it on my cover letter if I ever send them a resume! Jan 10 '11 at 12:49
  • 1
    @Mark: That the <title> tag contents have been made to be {First Tag} " - " {Title Contents} does not support your assertion that every {Title Contents} should have an inflexible, inconsistent and non-indexable "tag" at the start of it. If anything, this backs up the usefulness of relying on the proper tagging system: the site is free to visualise question tags in the proper manner, because they are represented properly and atomically in the database. Jul 9 '11 at 23:24
  • 1
    Hi Tomalak, I think we're in agreement. Note my final suggestion: "Finally, be flexible -- Different questions benefit from different styles of titles. Applying any single hard and fast rule is probably a mistake." Jul 12 '11 at 0:06
  • 3
    -1 tags should not be part of the title. Aug 29 '11 at 21:12
  • 3
    it depends; if you are already browsing by the [oracle] tag, then putting, say, "ORACLE: blah blah foo bar" is kind of harmful. I do like and fully support tags worked organically into the title, though, but I really worry that seeing a lot of "[tag]: title" sends a dangerous message. Aug 29 '11 at 22:30
  • 12
    Worth noting the difference between working a "tag" into the title, and working the subject of the question into the title. Because it's the latter that we really, really want. If your title is vague or hard to understand without some crappy prefix, your title sucks - with or without the crappy prefix.
    – Shog9
    Aug 29 '11 at 22:34
  • 1
    wow , so many criteria for good tittle
    – fairybet88
    Apr 30 '15 at 2:35

Use full grammatically correct questions

  1. Write every title as a full complete grammatically correct question sentence, and finish it with question mark ?

    It makes the questions clearer, and more attractive.

    Otherwise, we are writing in semi defined "title-language" that no one really speaks.

  2. Repeat key tags in the title because:

  3. Use How to whenever it applies, don't use:

    • How do I: yes, since you are asking, we know it is you :-)
    • What is the best way to: people don't usually not want the best way to

Sample good title that follows all above rules:

How to print an integer as hexadecimal in C?

This style is also currently supported by the page: https://stackoverflow.com/help/how-to-ask (archive):

Spelling, grammar and punctuation are important! Remember, this is the first part of your question others will see - you want to make a good impression. If you're not comfortable writing in English, ask a friend to proof-read it for you.

Bad: C# Math Confusion
Good: Why does using float instead of int give me different results when all of my inputs are integers?
Bad: [php] session doubt
Good: How can I redirect users to different pages based on session data in PHP?
Bad: android if else problems
Good: Why does str == "value" evaluate to false when str is set to "value"?

This style is further supported yet again by "Title" section of the new ask question wizard from as of 2019-04 https://stackoverflow.com/questions/ask?guided=true

Imagine you’re asking a question to another developer.

For example:

Say “Is there an R function for finding the index of an element in a vector?”

Don’t say “Please help with R”

Say “How to fix ‘Headers already sent’ error in PHP”

Don’t say “PHP error: Why isn’t this working?”

It seems that SO devs agree with me at least then ;-)

  • 1
    Can you add an example of a question with "How to"? It is not clear whether or not you recommend a question mark in those. Mar 9 '19 at 12:52
  • 1
    @PeterMortensen yes, my intention was that the ? should be used in those due to rule number 1. I've added an example to clarify further. Mar 9 '19 at 19:03
  • 1
    Many questions can do just fine without a full grammatical title. There's no reason to insist on it for all questions. Repeating tags in the title is usually redundant, since the site adds them to the page's HTML title anyway. Starting a question with "How to" would be ungrammatical, anyway (Yes, your first example is an ungrammatical sentence fragment.), so you have some contradictory advice here. The examples in your final block quote are differentiated primarily by specificity; the "Don't say" examples are vague and provide no detail about the nature of the question.
    – jpmc26
    Jun 28 '19 at 7:19
  • 1
    @jpmc26 thanks for feedback (Y) Jun 28 '19 at 7:24

You must log in to answer this question.

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