Welcome to WebmasterWorld Guest from 54.163.35.238

Message Too Old, No Replies

Google reading underscores in URls wrong?

     

internetheaven

9:24 am on Mar 21, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I have a URl:

www.example.com/folder/file_name.htm

and 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?

Mike

Receptional Andy

12:10 pm on Mar 21, 2009 (gmt 0)



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.

rainborick

12:50 pm on Mar 21, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I believe that the last time Mr. Cutts talked about it, he said that the change to the way they treated underscores was either postponed or canceled. In any case, my recollection is that it never happened.

httpwebwitch

1:26 pm on Mar 23, 2009 (gmt 0)

WebmasterWorld Administrator httpwebwitch is a WebmasterWorld Top Contributor of All Time 10+ Year Member



The same Mr. Cutts cited (this was at least 3 years ago) that Google's handling of underscores was the way it was because the product was initially created and tested by a bunch of programmer geeks. Because many function names and techy things use underscore as a word character, it was not considered a "whitespace" character and hence not a word separator.

Hyphen is a word separator, and always has been.

Thus it's conventional to use hyphens to separate keywords in all urls and file names.

HuskyPup

2:02 pm on Mar 23, 2009 (gmt 0)



I seem to remember it being said last year by Google that if one was building a new site then to use hyphens but not to worry if you had an older site using underscores.

FWIW I have thousands of urls and images all ranking extremely well using underscores and trying to get out of typing underscores after all these years is very difficult!

g1smd

2:11 pm on Mar 23, 2009 (gmt 0)

WebmasterWorld Senior Member g1smd is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



allinur[b]l: f[/b]ile

The error here is the space after the colon. There should be no space.

nealrodriguez

2:33 pm on Mar 23, 2009 (gmt 0)

WebmasterWorld Senior Member 5+ Year Member



i don't know but the last update i read on this alluded to matt cutts wordcamp '07 talk on how google was 'working' on treating underscores just like hyphens:

[mattcutts.com...]

If you read Stephan Spencer’s write-up, he says some people thought that underscores are the same as dashes to Google now, and I didn’t quite say that in the talk. I said that we had someone looking at that now. So I wouldn’t consider it a completely done deal at this point. But note that I also said if you’d already made your site with underscores, it probably wasn’t worth trying to migrate all your urls over to dashes. If you’re starting fresh, I’d still pick dashes.

i know some seo's are telling their clients that google publicly announced that they are officially treating them the same;

g1smd

2:38 pm on Mar 23, 2009 (gmt 0)

WebmasterWorld Senior Member g1smd is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



Check the results for [_add] and [add_] and [add] to see that isn't true.

nealrodriguez

2:44 pm on Mar 23, 2009 (gmt 0)

WebmasterWorld Senior Member 5+ Year Member



yeah, i definitely advocate the use of hyphens all over; I just wanted to highlight that i haven't seen google announce anything stating that they officially treat underscores as separators.

pageoneresults

3:13 pm on Mar 23, 2009 (gmt 0)

WebmasterWorld Senior Member pageoneresults is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



I just wanted to highlight that i haven't seen google announce anything stating that they officially treat underscores as separators.

Ya but their documentation has been revised to include suggestions about not using underscores in URIs. They also state that you don't need to go back and change them but if you are planning a URI structure change, to nix the underscores.

One bad thing about underscores that I've picked up from Social Media and URI shortening services is that they appear to "always" trigger the URI shortener. I've managed to work a formula to where I can keep branded URIs from being shortened. Those underscored URIs don't work from a variety of perspectives.

Of course there will be many who are going to smack me for saying that. Hey, the truth hurts, I can take it. ;)

nealrodriguez

3:24 pm on Mar 23, 2009 (gmt 0)

WebmasterWorld Senior Member 5+ Year Member



I've managed to work a formula to where I can keep branded URIs from being shortened.

if the branded url is longer than the shortened version, you may want to consider using the shortened version to facilitate retweets. the easier it is for somebody to retweet your link with your @username without chopping up the preceding words the better chance you'll have it retweeted without mistakes.

of course if the underscore is triggering the shortening app on a branded url, with the same or less characters than the shortened version, of course employ your e=mc2 evolution without hesitation ;)

g1smd

3:40 pm on Mar 23, 2009 (gmt 0)

WebmasterWorld Senior Member g1smd is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



I always try to leave 15 to 20 characters free for people to add in whatever they want when they RT.

pageoneresults

3:46 pm on Mar 23, 2009 (gmt 0)

WebmasterWorld Senior Member pageoneresults is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



Let's go back to underscores. Can we list the pros vs cons of using them?

Pros

Still thinking...

Cons

1. Underscores obscured in hyperlinks. IE and others tend to blend those underscores right in with the text-decoration: underline. Is that a space?

2. Underscores are an unnatural keystroke for many.

I'll leave Cons 3, 4, 5, 6... for others. :)

[edited by: pageoneresults at 4:40 pm (utc) on Mar. 23, 2009]

piatkow

4:04 pm on Mar 23, 2009 (gmt 0)

WebmasterWorld Senior Member piatkow is a WebmasterWorld Top Contributor of All Time 5+ Year Member Top Contributors Of The Month



The only pros that I can think of are that they are second nature to people who started out using programming languages or databases that required them.

Seb7

4:55 pm on Mar 23, 2009 (gmt 0)

5+ Year Member



Pro - There the nearest thing to a space.

(I've never used underscores in URLs)

nealrodriguez

5:51 pm on Mar 23, 2009 (gmt 0)

WebmasterWorld Senior Member 5+ Year Member



2. Underscores are an unnatural keystroke for many.

unless you took typing class in high school and could type blind folded doing bench presses; my pinky could hit an underscore harder than a sledge hammer;

back to it:

3. you have to hold down the shift key to type an underscore; if you accidentally hit the ctrl key, you'll need military-issued binoculars to read the monitor.

4.

Lots of computer programming languages have stuff like _MAXINT, which may be different than MAXINT. So if you have a url like word1_word2, Google will only return that page if the user searches for word1_word2 (which almost never happens).

[mattcutts.com...]

AjiNIMC

6:35 pm on Mar 23, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Check this

[google.com...]

and [google.com...]

pageoneresults

6:43 pm on Mar 23, 2009 (gmt 0)

WebmasterWorld Senior Member pageoneresults is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



Great example. That tells us that the hyphen is treated as white space and the underscores are not. Bravo!

nealrodriguez

7:12 pm on Mar 23, 2009 (gmt 0)

WebmasterWorld Senior Member 5+ Year Member



Check this

[google.com...]

and [google.com...]

interesting to note, however, after reviewing those serps, that wikipedia uses underscores to separate the keywords describing their entries; and you know much they tank on the serps ;) doesn't take from the fact that the symbols are treated differently.

AjiNIMC

7:29 pm on Mar 23, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I also did notice that Wikipedia uses underscores. Wikipedia tanking on the SERP is a total different thing, (I have written about it many times. My recent post highlighted a very important fact about it, "How commercial businesses are not afraid of linking to wikipedia", I was many pages that were better than wikipedia to link to for a topic but I was scared to loose my prospect customer to another business. Wikipedia is tooooooo SE friendly.)

Coming back to the topic, consider this
[google.com...]

it did not tigger any URL that has _Bowery, only with the "-" (dashes) are coming in the list.

internetheaven

8:25 pm on Mar 23, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



allinurl: file

The error here is the space after the colon. There should be no space.

Google put the space there.

Anyway, it still doesn't show if you take the space out.

Like many, I was sure I'd heard Matt Cutts say something along the lines of "we treat underscores the same as hyphens in URls". A URl re-write is going to be a pain! But looks like this problem may be a permanent one so I'll probably stick to hyphens from here on in.

Alcoholico

10:08 pm on Mar 23, 2009 (gmt 0)

5+ Year Member



So, this is not true: [news.cnet.com...]

tedster

10:16 pm on Mar 23, 2009 (gmt 0)

WebmasterWorld Senior Member tedster is a WebmasterWorld Top Contributor of All Time 10+ Year Member



Matt directly addressed that article in his blog:

If you read Stephan Spencer’s write-up, [he says] some people thought that underscores are the same as dashes to Google now, and I didn’t quite say that in the talk. I said that we had someone looking at that now. So I wouldn’t consider it a completely done deal at this point. But note that I also said if you’d already made your site with underscores, it probably wasn’t worth trying to migrate all your urls over to dashes. If you’re starting fresh, I’d still pick dashes.

[mattcutts.com...]

ecmedia

1:44 pm on Mar 24, 2009 (gmt 0)

5+ Year Member



Underscores are for geeks; my grandma does not even know how to insert one. Hyphens make sense to everyone.

loudspeaker

2:26 pm on Mar 24, 2009 (gmt 0)

5+ Year Member



Linguists would probably say it should be the other way around. Underscores don't exist in written English - a perfect "white space" alternative! Hyphens do exist in many words: well-fed, gas-fired, pick-me-up, tear-off, and so on, to give a few random examples, so using them as a space is ambiguous and confusing.

nealrodriguez

5:18 pm on Mar 24, 2009 (gmt 0)

WebmasterWorld Senior Member 5+ Year Member



well considering the time it takes for google to enhance their search engine, so they can say they can 'officially' do something, to the time it takes for us to see google do half of what they say they can do, based on our experimentation, since they are merely 'working' on treating them the same, i'd say to stick with the hyphens; at least until 5pm ;)

Alcoholico

6:53 pm on Mar 24, 2009 (gmt 0)

5+ Year Member



Underscores are for geeks; my grandma does not even know how to insert one.

That's the best reason for using underscores as separators, they do not belong to any natural language and "normal" users (SE users and grandmas) won't type them so easily in queries.

Thanks tedster for clarifying.

g1smd

7:15 pm on Mar 24, 2009 (gmt 0)

WebmasterWorld Senior Member g1smd is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



Surely you mean " ... for not using underscores ... " here?

Alcoholico

9:27 pm on Mar 24, 2009 (gmt 0)

5+ Year Member



No, but I'm sorry, I should've said "For ME, that's the best reason for using underscores as separators", certainly not for google at this point.
 

Featured Threads

Hot Threads This Week

Hot Threads This Month