Friendly URLs should not use dashes to represent spaces

Surely nobody with the slightest respect for the English language would use dashes instead of spaces. In a title, URL, or anywhere else. Similarly, nobody with any appreciation of the power and utility of basic punctuation would hyphenate every word indiscriminately.

If I use punctuation, in a friendly URL or in any other context, I endeavour to use it correctly. I don't put dashes where they don't belong. If I hyphenate, I do so for good reason. Good technology does not constrain the use of language or corrupt its meaning. There are other characters available that can provide a benign substitute for a space, like "_", the underscore.

This is not to be confused with conservative snobbery. I welcome positive developments in the use of English, like SMS abbreviation or "text speak" which -- in the appropriate context -- manifests a pragmatic evolution of the written word. However, correct punctuation is a serious matter.

Dashes can change the meaning

The presence of a single "-" symbol can dramatically alter the meaning of a simple phrase, as can the placement of the symbol. It is not a neutral character. In conclusion, incorrect punctuation can create statements which are ambiguous, misleading, or even untrue.

  • man eating fish
  • man-eating fish
  • you will work twenty four hour shifts
  • you will work twenty four-hour shifts

Symbols serve an important role

Articles on web sites could easily have titles and friendly URLs with statements like these. Imagine the potential implications if the "-" symbol was misplaced or misused in a medical text -- it could literally make the difference between life and death. In conclusion, the proper use of punctuation, symbols and special characters -- producing clear, accurate statements -- is well-demonstrated by technical or scientific text, in which high complex information must be communicated clearly and accurately.

  • -196 oC is the boiling-point of liquid-nitrogen
  • N-methyl-d-aspartate receptor-induced toxicity is calcium-dependent

I believe that rogue dashes in URLs are a transient phenomenon. The technology will nature. The next generation of content management systems will be better and more consistent. Eventually a consensus will emerge on the best delimiter for friendly URLs --probably the underscore.

I can't imagine any of the editorial colleagues I've worked with -- from editorial directors at the world's largest online open-access scientific publishing company, to editorial assistants in a media company writing-up celebrity gossip -- deliberately misusing punctuation marks in the title of a web page. Yet the rules for punctuation in friendly URLs should be a decision made by editorial and/or business people, not technical people.

08 August 2009

Share the love:

Comments: 15

Add Comment

Tim Acheson (09 Aug 09, 12:40)

Search Engine Optimisation

I sometimes encounter spurious arguments citing SEO to justify the use of dashes in URLs. Let's not underestimate the importance of search-engine optimisation; it's an essential consideration for any commercial online operation. But we don't have to sell our souls over it. It's a question of quality and integrity. You wouldn't try to manipulate search results. You wouldn't deliberately put badly written English on every page. You wouldn't deliberately add erroneous punctuation to copy written for your online content. By the same token, neither should you do so in your URLs.

Google does currently appear to recommend the use of hyphens. (This part of the documentation may be out of date.) However, the difference made by URL keywords is small, and within that the affect of underscores, if any, appears to be negligible. Try test on either Google or Bing, and you can see for yourself that individual keywords are recognised in a URL with underscores, and indeed highlighted bold on the results page.

There may be some historical reason for preferring underscores. There have been indications that Google is improving the way in which underscores are handled. Google isn't always right. They constantly improve the service. I wouldn’t endorse doing something just because Google prefers it. Do what seems best. Google will accommodate. Don't bend the way you work to suit Google. Search engines are not supposed to have that effect on the web. Google's job is to work with an Internet that evolves naturally and independently.

Elena Plaiter (10 Aug 09, 14:50)

I think that you're right. Dashes also serve a grammmatical/punctuation function within the English language and can cause confusion, whereas underscores are used for one purpose alone - to represent spaces, and this has always been the case historically e.g. with email addresses.

Also, from a visual perspective underscores are longer than dashes therefore making spaces within URL's easier to identify.

Finally, when giving a URL out verbally it is better to say "use underscores for spaces" rather than "use dashes", which would cause confusion if there were also dashes inbetween words in the URL. And in a worst case scenario people may get confused and use slashes rather than dashes!

Either way, Editors should ensure that article titles are concise, yet clearly indicate the nature of the article.

I would use dashes to separate the words in a URL string. I've always been lead to believe that Google tends to rank these higher than those separated with an underscore. Not sure what other search engines do though.

From an editorial perspective, I would always recommend avoiding dashes in headlines. They are often used as a substitute for colons, semi-colons or brackets, which I personally see as lazy punctuation! If you're going to write for a living then learn how to use the language properly. That being said, I would use it to introduce an afterthought, but again, I would avoid an afterthought in a title.

You can't always avoid them though: there will always be hyphenated words and negative numbers for example. But you'd drop the hyphen in the URL string to avoid getting two dashes e.g. a headline reading "Dogs as canny as two-year-olds" would be "dogs-as-canny-as-two-year-olds" in the URL string.

Personally I want to reach more people with the content I've written. So get the SEO right (use the dashes) and write a decent meta description (to clear up any ambiguity caused by unavoidable dashes).

Tim Acheson (10 Aug 09, 15:58)

Thanks, Elena. It's useful to hear the opinion of an online editor. Naturally, I tend to approach things from a technical perspective. It's interesting to hear the thoughts of a professional on the editorial side.

Tim Acheson (10 Aug 09, 16:00)

Thanks "Miss Bat" especially for mentioning the SEO argument, it's hard to ignore it.

Koistya `Navin (27 Oct 09, 21:03)

Fully agree with the author.

Tim Acheson (28 Oct 09, 14:46)

Thanks, RIA Guy. :)
Chuck Reynolds (06 Jan 10, 07:38)

Historically hyphens were the way to go, hence the adoption and current 'recommendation' by G to do so. Matt Cutts has a post from 05 saying to use dashes instead of underscores:

You can't doubt that G has been indexing sites more accurately with either or these days - they have to or they wouldn't be delivering proper content. but...

I still say use dashes/hyphens... it's tried and true, and I've argued it many times but when Google says the sky is green, then the sky is green. With 75%+ of the search marketshare - you kinda have to take that literally as said here in G webmaster central:

Tim Acheson (06 Jan 10, 12:46)

Chuck, you're right. I love your metaphor: "when Google says the sky is green, then the sky is green."

Personally I don't want to deliberarely use incorrect punctuation in my URLs just to accommodate Google, and I'm prepared to stand my ground. ;).

John Waller (22 Jun 10, 23:17)

"Matt Cutts has a post from 05 saying to use dashes instead of underscores:"

He's also quoted by CNET as saying that it doesn't really matter any more since Google has now tweaked its algorithms.

"Underscores are now word separators, proclaims Google"

Tim Acheson (23 Jun 10, 14:24)

Thanks John, these are useful links.

I'm aware of the claim that Google has promised to make this correction.

I have not yet seen any official confirmation that underscores and dashes are now treated equally. I would welcome confirmation of this!

Perhaps this ammendment was deployed with the release of Caffeine on Google's web search. Confirmation is needed! :)

I am aware that certain individuals at Google have in the past endorsed the use of hyphens in place of spaces in URLs. Sadly, such statements have fueled and perhaps even caused the proliferation of badly-syntaxed URLs throughout the web.

People should use underscores to represent spaces in a URL, not dashes!

Underscores are a conventional and acceptable alternative to spaces. Dashes serve a different purpose and should only be used for that purpose.

The widespread use of URLs with dashes can substantially be attributed to deficiencies in Google's search systems.

The use of dashes instead of spaces is an unfortunate trend which is to be strongly discouraged.

Dave Smith (05 Jul 10, 14:09)

# man eating fish
# man-eating fish

Agreed the "-" changed the meaning.

Interested that you called it a "-" symbol and not hyphen? After all it was a hyphen at work and not another dash.

I read up on the ASCII hyphen/minus that is used in URLs and in Unicode it is named "hyphen-minus":

Therefore not strictly a hyphen or a minus, but something between. Which works fine.

My point being that the semantics get a bit blurry at certain points. Also some URLs are beginning to represent keyword combinations rather than titles or sentences, dropping common words like if, for, and... for example "Bag of Beans" => /bag-beans/.

all the best

Tim Acheson (13 Jul 10, 10:19)

Thanks, Dave. These points are useful -- and interesting!

konstantinpikalo (30 Jan 11, 21:26)

What a great web log. I spend hours on the net reading blogs, about tons of various subjects. I have to first of all give praise to whoever created your theme and second of all to you for writing what i can only describe as an fabulous article. I honestly believe there is a skill to writing articles that only very few posses and honestly you got it. The combining of demonstrative and upper-class content is by all odds super rare with the astronomic amount of blogs on the cyberspace.


  • Twitter
  • LinkedIn
  • Facebook
  • Windows Live / Messenger
  • Xbox Live
  • RSS
  • Email