Welcome to WebmasterWorld Guest from 54.147.134.218

Message Too Old, No Replies

Google reading underscores in URls wrong?

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

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Feb 25, 2003
posts:2527
votes: 0


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

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

Senior Member

joined:Jan 27, 2003
posts:2534
votes: 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.

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

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Apr 15, 2003
posts:904
votes: 5


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.
1:26 pm on Mar 23, 2009 (gmt 0)

Moderator from CA 

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

joined:Aug 29, 2003
posts:4059
votes: 0


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.

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

Senior Member

joined:June 3, 2007
posts:6024
votes: 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!

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

Senior Member

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

joined:July 3, 2002
posts:18903
votes: 0


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

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

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

Senior Member

WebmasterWorld Senior Member 5+ Year Member

joined:Mar 20, 2008
posts: 673
votes: 0


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;

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

Senior Member

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

joined:July 3, 2002
posts:18903
votes: 0


Check the results for [_add] and [add_] and [add] to see that isn't true.
2:44 pm on Mar 23, 2009 (gmt 0)

Senior Member

WebmasterWorld Senior Member 5+ Year Member

joined:Mar 20, 2008
posts:673
votes: 0


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.
3:13 pm on Mar 23, 2009 (gmt 0)

Senior Member from US 

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

joined:Apr 27, 2001
posts: 12166
votes: 51


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. ;)

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

Senior Member

WebmasterWorld Senior Member 5+ Year Member

joined:Mar 20, 2008
posts: 673
votes: 0


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 ;)

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

Senior Member

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

joined:July 3, 2002
posts:18903
votes: 0


I always try to leave 15 to 20 characters free for people to add in whatever they want when they RT.
3:46 pm on Mar 23, 2009 (gmt 0)

Senior Member from US 

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

joined:Apr 27, 2001
posts: 12166
votes: 51


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]

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

Senior Member

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

joined:Apr 5, 2006
posts:3284
votes: 12


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.
4:55 pm on Mar 23, 2009 (gmt 0)

Preferred Member

5+ Year Member

joined:Nov 20, 2007
posts:585
votes: 0


Pro - There the nearest thing to a space.

(I've never used underscores in URLs)

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

Senior Member

WebmasterWorld Senior Member 5+ Year Member

joined:Mar 20, 2008
posts:673
votes: 0


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...]

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

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Oct 8, 2003
posts: 1419
votes: 0


Check this

[google.com...]

and [google.com...]

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

Senior Member from US 

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

joined:Apr 27, 2001
posts: 12166
votes: 51


Great example. That tells us that the hyphen is treated as white space and the underscores are not. Bravo!
7:12 pm on Mar 23, 2009 (gmt 0)

Senior Member

WebmasterWorld Senior Member 5+ Year Member

joined:Mar 20, 2008
posts: 673
votes: 0


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.

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

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Oct 8, 2003
posts: 1419
votes: 0


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.

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

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Feb 25, 2003
posts:2527
votes: 0


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.

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

Junior Member

5+ Year Member

joined:Nov 14, 2006
posts:172
votes: 0


So, this is not true: [news.cnet.com...]
10:16 pm on Mar 23, 2009 (gmt 0)

Senior Member

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

joined:May 26, 2000
posts:37301
votes: 0


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...]

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

Preferred Member

5+ Year Member

joined:Sept 28, 2007
posts:487
votes: 0


Underscores are for geeks; my grandma does not even know how to insert one. Hyphens make sense to everyone.
2:26 pm on Mar 24, 2009 (gmt 0)

Full Member

5+ Year Member

joined:May 31, 2006
posts:268
votes: 0


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.
5:18 pm on Mar 24, 2009 (gmt 0)

Senior Member

WebmasterWorld Senior Member 5+ Year Member

joined:Mar 20, 2008
posts:673
votes: 0


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 ;)
6:53 pm on Mar 24, 2009 (gmt 0)

Junior Member

5+ Year Member

joined:Nov 14, 2006
posts:172
votes: 0


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.

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

Senior Member

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

joined:July 3, 2002
posts:18903
votes: 0


Surely you mean " ... for not using underscores ... " here?
9:27 pm on Mar 24, 2009 (gmt 0)

Junior Member

5+ Year Member

joined:Nov 14, 2006
posts:172
votes: 0


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.
 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members