Anne van Kesteren

URI's

You have probably read cool URIs don't change, it's good for Google! Let me give you another tip. When you name a document or directory, which has multiple words, never separate those with underscores! Example: Google Search: hyphen_underscore. Let's try that again: Google Search: hyphen-underscore ;-).

Comments

  1. Do you have any explanation?

    Posted by Sylvain at

  2. Not really, it was just a small fact. Your file name's should look like: "css-at-import-test.htm" for example, instead of "css_at_import_text.htm" for better Google indexing as showed above.

    If you want to have this within Movable Type read this: Google-Optimizing entries from underscore to hyphen.

    Posted by Anne at

  3. Hello Anne,

    Long time lurker, seventh(?) time poster :) (you should keep track of the number of comments each visitor has made - I'm very competitive ;)

    Anyway, interesting finding, and potentially very useful. Can it be generalized to any combination of words with underscores? Of course, I could try for myself, but it's so much easier to ask you.

    Posted by Lars at

  4. Google Search: yes_it_can :-)

    Posted by Anne at

  5. And so much more fun :)

    Thanks.

    Posted by Lars at

  6. Google search "yes-it-can googlism". I guess you made a small analysis error: of course, if you search for "_" then google will return only the words with underscores. But if you search for "-", it will remove them and treat them as separate words. Now the question is: if I'm searching for "yes it can" and the words "yes it can" are not on the website, will it find the page simply because it's called "yes_it_can"? I couldn't verify this because the title contains the words "yes it can"...

    Posted by ricky at

  7. While this looks to be true, I wonder how useful it really is. It seems to work, but I'm not convinced, in the real world, that this would make much of a difference. I can't seem to find any hard evidence to back that up and I doubt there is much in real world terms.

    I understand that if the two go head-to-head, the underscore would lose, but how often does that happen. If I have a page titled "Acme Widgets" and named acme_widgets.htm it's going to beat out a page called "Home" named acme-widgets.htm every time.

    There are many other things (better page titles) you can be doing to optimize your site for Google that will reap much more benefits than this. I'm not saying you shouldn't do it, but in many cases this could be something that takes significant effort that has very little in the way of benefit.

    I personally like to use underscores because they are more easily read by a human than hyphens. I was also under the impression that an underscore is a machine readable "space" (regardless of how Google's magic recipe sees it) and a hyphen was a "switch" (-on -off, etc.) -- I could very well be wrong.

    One thing I would not recommend is changing all your files from an underscore to a hyphen unless you have contingencies set up or are starting a new.

    Posted by Keith at

  8. I have to agree with Keith. And actually I'm a little surprised to see you advocating this Anne, since you are definitely on the purist end of the standards crowd. A dash has grammatical meaning in english whereas the underscore has always been a more utilitarian symbol. First on the typewriter it was actually used to create underlines, but in the computer world it has always served as a replacement for a space where a space is not allowed.

    Nevertheless, it is a fascinating fact that google views a hyphen as a word separator.

    Posted by Gabe da Silveira at