Over a year ago, almost two years ago, there were rumors that Google would treat underscores in the URL the same way they treat hyphens in the URL, as word separators. Matt Cutts squashed the rumor back then, suggesting that Google was not treating them the same.
Historically, underscores (i.e. domain.com/file_name.html) was treated as a single word (i.e. filename) and hyphens (i.e. domain.com/file-name.html) was treated as two words (i.e. file name).
A new WebmasterWorld thread asks more questions on that. Senior member, internetheaven, noticed, and I quote:
I have a URl: www.example.com/folder/file_name.htmand if you search for:
allinurl: file site:example.com
or
allinurl: name site:example.com
you get 0 results. Whereas if you search for:
allinurl: file_name site:example.com
the page shows up in the results fine.
I thought underscores were the same as hyphens these days?
Well, they are not the same these days, and that might be proof. Technically, I do see results that do match on sites I tested for these types of queries. What I mean is that Google will still highlight and display results for a keyword that is in part of the underscored URL. I am not sure why it did not show up for this member. Maybe it is something happening at Google.com and since I am currently in Israel, I am getting a different data set.
Receptional, WebmasterWorld moderator, explained:
In certain cases, Google may figure out that underscore is being used as a word separator (similar to the process for conjoined words). But an underscore is not a word separator - treating it as such would at a minimum cause a lot of developers to be frustrated when using Google, as many function names etc. use underscores.Underscores and hyphens have never been treated the same - if you want a guaranteed word separator in a URL, always use a hyphen.
For now, until we hear from Matt on a change in underscores and hyphens, Google treats them differently.
Forum discussion at WebmasterWorld.