ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Dashes versus underscores in urls

March 01, 2011 10:00pm

Subscribe [14]
  • #1 / Mar 01, 2011 10:00pm

    Roi Agneta

    352 posts

    I never really gave the subject of dashes versus underscores much thought until someone mentioned to me that hyphens are recognized as word separators by Google, but hyphens are not.  So, I did some research, and sure enough Matt Cutts, the Google guy who advises people like us, clearly states that hyphens are preferred.

    I did a bunch more searching and it seems the overwhelming majority of (self-professed) gurus use hyphens - many of them quoting Matt Cutts.

    So, two questions: anyone have any wisdom you would care to share?  And, for the EE people, why is underscore the default for channel entry urls?

    Roi

  • #2 / Mar 02, 2011 12:38am

    Onboard Creative

    39 posts

    Good point Roi. While it’s better for search engines I think dashes are easier to read the URL (novices might not see the underscore) and when you double-click the code it highlights the word in my editor (Coda). With underscores it doesn’t. I have no idea why EE defaults to underscores but that’s one of the first things I change.

  • #3 / Mar 02, 2011 7:12am

    Neil Evans

    1403 posts

    pesonally i use underscores in code (i.e. field names, or in addons, etc) And use dashes in URL’s - more of a habit than rule but one that made sense to me.

    Also note that underscores in URL’s - when using these as links, and note by default links are underlined, you often do not see the underscore, hence a lot of manually typed errors.

    In terms of google - i am sceptical. i have seen two purchased domains http://www.blue-widgets.com and www.bluewidgets.com with no site associated to them or inbound links (i.e. no other factors than the domain) - the domain without the hyphen is rated higher. So i would be intruiged to see a similar test of file names with underscore vs hyphen!

  • #4 / Mar 02, 2011 10:17am

    Roi Agneta

    352 posts

    Jon and Nevsie, thanks for sharing your thoughts.  One thing in favor of hyphens, as Jon points out, is that Coda and Textmate will select the individual word!  And Nevsie, I share your skepticism and saw a few articles that claimed their rankings went up when they switched to underscores.

    From a user perspective, I am not sure it matters.  How many people memorize (or even read) a url as opposed to bookmarking it?  I am not talking here about the domain name, but a segment that is perhaps the third or fourth, e.g. http://www.mydomain/news/articles/man_bites_dog

    In any event, I think I am going to start using hyphens just to play it safe.

  • #5 / Mar 02, 2011 10:28am

    Roi Agneta

    352 posts

    Just had to share this with everyone.  I just received a bunch of Google Analytics reports from sites I have developed.  Check out the url structure:

    Analytics_www.peacehouse.org_201102_(Monthly_Google_Analytics_Report).pdf

    The irony here, of course, is that the url was created by Google, the very same people who recommend hyphens!!!

  • #6 / Mar 02, 2011 12:28pm

    Onboard Creative

    39 posts

    Go figure! Maybe they don’t want the reports showing up in their own search engine 😊

  • #7 / Mar 02, 2011 12:33pm

    Roi Agneta

    352 posts

    That must be it, Jon!

  • #8 / Mar 02, 2011 8:06pm

    Nathangrab

    1 posts

    Exactly right! In google hyphens are use as a form of word separator
    Philwebservices

  • #9 / Mar 16, 2011 11:15am

    HI All,

    Recently, I did some research into dash (hyphen) vs underscore just this week because I wanted a definitive answer. I have traditionally used dashes for a variety of reasons (originally they were recommended for SEO, but didn’t know if that was still true. And better UI for less tech savvy users). But I wasn’t sure if it still mattered.

    I found a lot of interesting info that I wrote up in an article - http://themetaq.com/articles/seo-under-scrutiny-are-hyphens-or-underscores-better-word-separators

    (for the record, we always switch EE’s default from underscore to dash too.)
    Cheers!

  • #10 / Mar 16, 2011 11:28am

    Roi Agneta

    352 posts

    Thanks for this, Susan.  My own research yielded results that are consistent with yours. 

    Matt Cutts actually made an unambiguous statement on the subject - dashes/hyphens are treated as word separators and underscores are not.  However, that still leaves me with two questions:

    Why does Google use underscores in their Analytics links (see my earlier post)?
    Why does EE default to underscores?

    Roi

  • #11 / Mar 16, 2011 11:34am

    Hi Roi,

    My guess about the underscores in the Google analytics reports is some combination of (a) they aren’t going to be crawled and archived to be findable again (b) the engineers who worked on it liked the underscores? ha ha (c) a lot of Google’s URL structures are inconsistent. For example, on this page from Google Webmaster Central about SEO http://www.google.com/support/webmasters/bin/answer.py?answer=35291 their SEO guide PDF has dashes: http://www.google.com/webmasters/docs/search-engine-optimization-starter-guide.pdf

    As far as EE’s underscores as default, I have no idea 😊 Someone went that route and it stuck I guess.

    Cheers!

  • #12 / Mar 16, 2011 12:32pm

    Roi Agneta

    352 posts

    Susan - I think you are right on both counts!

  • #13 / Mar 16, 2011 7:17pm

    narration

    773 posts

    It’s a good and useful article, Susan - thanks for the research.

    I went over the same ground recently, just checking understandings behind a proposal.

    That underscores get different search results is by the stories deliberate. Technical terms often have underscores where one word is desired: variable and function names, for example. Google, being rather technically orientated, apparently chose to make it easy to find those. Probably, since the issue doesn’t exist in natural languages, it was a good choice.

    Whether this distinction about underscores has any meaning as far as SEO may be a different question. Only the inner Googlites would know, and I am afraid I am pretty allergic to spending time on videos to try to decode sound bites about such things. Also, if it can’t be documented, it is hearsay at best.

    Matt Cutts has seemed to have it both ways over the years, and given the goals of Google’s rating systems, I would suppose them to pay a lot more attention to titles and h1/h2 etc. headings than syntax in the browser address line.

    Unique and meaningful headings and titles do seem to be mentioned prominently in thoughtful discussions about SEO, and I guess that, as a part of site communications design, is where I feel personally drawn to put effort. It could be that there are other magics, however, left over from earlier search engine days.

    Reading about any of these topics, I keep thinking that what’s said for SEO may not be entirely what needs to be thought about for search findability itself. Keywords are an example, which Y and G say have no function in SEO, but which can I believe have ability to let a site be found for terms and phrases not preferred in its text.

    Anyway, interesting to listen, and I am sure deep and monitored experience such as that of grrramps has important points to offer.

    Regards,
    Clive

  • #14 / Mar 16, 2011 7:24pm

    narration

    773 posts

    p.s. just noticed, Susan, in a glance at your article again, how much interesting and useful information was in the sidebar. That’s really well done, and amplifies your article considerably.

    Why didn’t I notice this at first? Probably too used to tuning out advertising in sidebars.

    Which leads to thinking about how to make meaningful sidebars more apparent.

    It seems that’s kind of an intriguing question….

    Best,
    C.

  • #15 / Mar 16, 2011 7:31pm

    Clive,

    Thanks, I appreciate your thoughtful comments.

    And I’m glad to get the feedback about the sidebar. I did want that to be noticed but not take over the reading of the article, and I think you’re right that is a little lost—especially as you noted that sidebars are filled with often content/ads/junk to ignore. Some considerations that crossed my mind in response to make the sidebar being more appropriately prominent: flip it to the left side, add color to the headlines, add colored sidebar/separator. Not sure what makes the most sense, but I’ll think about the switch and spruce it up. Thanks again I really appreciate the feedback!

    Best, Susan

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases