homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Visit PubCon.com
Home / Forums Index / WebmasterWorld / Content, Writing and Copyright
Forum Library, Charter, Moderators: not2easy

Content, Writing and Copyright Forum

Hyphens or Underscore vs. "A Space"
To which do I owe the best shot of getting a "winner"

 3:52 pm on Jan 5, 2009 (gmt 0)

Currently we use a combination of underscore and hyphens in the page URL, and near the tail of the URL we use spaces which come up as "%20" in the URL bar.

So, which over-all is better for indexing and usability.

I know this subject has been broached and discussed but it's been more than few years. Can I get an update on the current "Best Practices" concerning this? Thanks. ;)



 4:21 pm on Jan 5, 2009 (gmt 0)

Underscore is probably the worst possible approach, as no-one searches for "blue_widgets", plus anyone looking at the URL as a link does not know if they are seeing "blue_widgets.html" or "blue widgets.html".

A space is pretty bad, as they change into %20, confusing people - and it looks ugly.

Of the options you offer, blue-widgets is far and away the best. It is consistent, it does not look ugly, it is read by SEs as both "blue-widgets.html" and "blue widgets.html".

It works.

You could also use "blue.widgets.html", but I suspect many would find it confusing.

"bluewidgets.html" still has a major fan base, though, like most boy bands, the fans are tending to leave it behind. It does work, as SEs are increasingly able to parse "bluewidgets" effectively - but few will ever search for "bluewidgets", so it still risks second place to "blue-widgets.html"

I hope all that makes sense? ;)


 4:27 pm on Jan 5, 2009 (gmt 0)

I like...


I've found that I can eliminate most hyphenation by using a more intuitive taxonomy. Most sites are going to have at least one sub-directory level. I say most...


 10:09 pm on Jan 5, 2009 (gmt 0)

I read somewhere that Google is able to interpret underscores as spaces, so if you have existing pages that use them, I wouldn't change them.

If, like me, you don't make use of subdirectories in the way p1results describes, then hyphens are indeed a good choice.


 10:28 pm on Jan 5, 2009 (gmt 0)

We don't use any subdirectories. We used too but when we re-vamped the site, the decision was made to have virtually all pages come off the root. Good......Bad.......Neutral?


 11:36 pm on Jan 5, 2009 (gmt 0)

depends how many pages.

The need for a 'flat' site is overestimated; folders help in site management, and do no harm.

But what matters is not the structure, but the internal navigation. If that's ok, then 'depth' probably does not matter.


 3:37 pm on Jan 7, 2009 (gmt 0)

2000 + URL's and as far as "site mangement" goes, really no problem. We made the decision to use what would have been the folder names in the file name, which also is a keyword. I don't know if that makes a difference but "That's the way we roll" for now or unless someone tells us it's not correct. Well, not just someone but the general concensus anyway. ;)


 3:47 pm on Jan 7, 2009 (gmt 0)

There's more than one way to skin a cat ... your approach is neither better nor worse than most others, I'd guess.

But that being the case, I'd definitely avoid underscores for all *new* files. I have not heard that Google parses them happily, but I'd probably still not change the existing files.


 3:53 pm on Jan 7, 2009 (gmt 0)

2000 + URL's and as far as "site management" goes, really no problem.

YET! What a nightmare you are going to create for yourself. I've tried that totally "flat" structure before with everything at the /root and it didn't work out too well. In fact, it limited us severely in organizing and naming files appropriately. That is why I stated above that most sites will have at least one level in the taxonomy. This is "almost" mandatory to allow proper naming and growth moving forward.

I really hope you are addressing all the other things that were pointed out in your site review. ;)


 3:56 pm on Jan 7, 2009 (gmt 0)

I'm working on them, as we speak.


 7:49 pm on Jan 7, 2009 (gmt 0)

Don't use spaces or underscores. Just don't.

As you have seen, spaces turn in to %20 which makes%20the%20URL%20very%20hard%20to%20read.

Underscores are not treated as word separators by search engines. They also visually 'disappear' in underlined links.

Use dots or hyphens. They are treated as you would expect.


 8:30 am on Jan 8, 2009 (gmt 0)

i would suggest reviewing this thread:
How do you choose your URL file names? [webmasterworld.com]


 3:23 pm on Jan 8, 2009 (gmt 0)

Thanks phranque,
I'm printing it out and will read/review the thread. ;)


 3:32 pm on Jan 8, 2009 (gmt 0)

Underscores are not treated as word separators by search engines. They also visually 'disappear' in underlined links.

Google does treat underscores as word separators.--I've seen this confirmed somewhere official. Sorry, can't remember where. I researched this a couple of years ago--I have some pages with an underscore in the name and I was deciding if I should change them. I decided not to, since they were getting traffic. But I do avoid using underscores now.

Your second point is another good reason not to use them.

Fortune Hunter

 4:12 pm on Jan 9, 2009 (gmt 0)

I've tried that totally "flat" structure before with everything at the /root and it didn't work out too well. In fact, it limited us severely in organizing and naming files appropriately.

It is interesting you would say this. My own site uses a flat structure, which worked well for a while, but now it is getting so big that it is becoming a pain, especially when I want to promote a URL in print and don't want to put something like...


It is much easier to do...


which I have been able to do by creating a sub-directory and the main landing page in that directory is called index.htm which works well when promoting a print ad or direct mail piece for promotion, which I do somewhat regularly.

Outside of this I am finding it easier to look at a list of folders for various sections of the site and go in each to see particular pages that need to be modified rather than one long list of every page in the site.

However I have noted that some of the programs I use that create XML site maps for Google and/or Yahoo have trouble following all the links into these sub-directories and adding all of those pages to the map as well. I am not sure why.


 4:41 pm on Jan 9, 2009 (gmt 0)

If that URL is for a real folder, put a trailing slash on the end of your link, otherwise the server will simply send a redirect signal to the browser and the browser will have to make a new request for the new URL with the slash on the end.

I use "short" URLs for advertising. There is no "page" on the server at the short URL. The "short" URL is simply one of several entries in a list of 301 redirects in the .htaccess file. The user therefore sees the "real" URL for the page once they arrive at the site.


 6:45 pm on Jan 18, 2009 (gmt 0)

Thanks Quadrille - very tidy logic. So am I correct in saying the consensus is for hyphens and not for underscores? (or anything else for that matter . spaces etc)

[edited by: Andreas8 at 6:46 pm (utc) on Jan. 18, 2009]


 8:14 pm on Jan 18, 2009 (gmt 0)

Absolutely; comparing those two, there's no doubt at all that the vast majority would go for hyphens; even those who don't like hyphens would recommend them over underscores!

But there'll still be some who will vote for ANYTHING in preference to hyphens. Consensus, yes; total agreement, no. ;)


 3:18 pm on Jan 21, 2009 (gmt 0)

It's much better to use dots or hyphens,but definitely not spaces!


 2:47 am on Feb 2, 2009 (gmt 0)

Good to see this because I too had the debate and opted for hyphens as all around me were yelling "Underscore!"




 3:52 am on Feb 2, 2009 (gmt 0)

Yet, WW uses undescores...?

Global Options:
 top home search open messages active posts  

Home / Forums Index / WebmasterWorld / Content, Writing and Copyright
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved