Forum Moderators: Robert Charlton & goodroi

Message Too Old, No Replies

Dashes are better than Underscores ...

... between keywords in file names.

         

skyhawk133

8:56 pm on Apr 21, 2006 (gmt 0)

10+ Year Member



In a guest post by Vanessa Fox on Matt Cutt's blog, Vanessa points out dashes are much better than underscores. Matt later bolds this line in the blog entry for emphasis.

I had not thought about this, but apparently blue_widgets.html is considered 1 word, where as blue-widgets.html is considered 2 words. So for multi-word titles used as static HTML names, it looks like using a hyphen is far better than using an underscore. A brief look at the SERPS does confirm this.

mattg3

3:50 am on Apr 23, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hey MattG3, I would not want to redirect to the root(provided I understand those redirects)

Only one, the first redirects to root as it makes sense when having outdated pages.

All others do take what is after the domain name and redirect it to a new server/directory leaving whatsafter the domain name.

so what comes in on

blafasel.com/olddir/page.html
will be redirected to
blafasel.com/newdir/page.html

or blafasel.com/somepage.html
will be redirected to
www.blafasel.com/somepage.html

here are hints how to continue
[webmasterworld.com...]
if you have issues with QUERY_STRING

you can also look for RedirectMatch on apache.org etc.

You can of course also do

RedirectMatch Permanent /yourdir/^(.*)_(.*)$ /yourdir/$1-$2

or
RedirectMatch Permanent /yourdir/^([0-9a-zA-Z]*)_([0-9a-zA-Z]+)$ /yourdir/$1-$2

or whatever fits your pages. These are just examples.

annej

3:59 am on Apr 23, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I agree with the information we have now it makes sense to start using a dash instead of underscores on new pages. But why would anyone change a page that is doing well and has a lot of links to it. I don't see that much difference in how pages with underscores are doing from pages with dashes. It's just plain paranoia to rush out and change your whole site on things like this. MC didn't say everyone with underscores in their urls was doomed. He just suggested the other is better.

Asia_Expat

4:03 am on Apr 23, 2006 (gmt 0)

10+ Year Member



Sniffer... is 'My.product' not also a misude of the dot?

WW_Watcher

4:37 am on Apr 23, 2006 (gmt 0)

10+ Year Member



Hey matt3g, thanks for the redirect examples, I saved them for future reference!

Hey anniej, The new, smaller, non-established site is the one I renamed a bunch of files on. It is only about a month old, and has not had many of the pages indexed yet, and has not had many visitors yet.

The bigger, older, established site, I will not be changing the file names. I need to break up a bunch of the product pages(they have gotten too large over time, as I added more and more products to the pages) and I will use the dotted naming convention for all the new pages I have to create to move the products to. It was not out of paranoia, I have to change the pages, and create new pages anyway, I was only considering the re-naming, while I was changing each page.

Hey Asia_Expat, I chose the dotted naming convention over the dashed, because IMHO it is eaiser to read.

Back to watching, (I have got to stop posting, I have posted more today, than I have in months)
Thanks!
WW_Watcher

[edited by: WW_Watcher at 4:40 am (utc) on April 23, 2006]

georgeek

4:40 am on Apr 23, 2006 (gmt 0)

10+ Year Member



I just do not understand the logic of treating them differently. A dash is a seperator, and an underscore is a seperator, and IMHO, they should be treated the same.

They are by Yahoo!

sniffer

5:18 am on Apr 23, 2006 (gmt 0)

10+ Year Member



Sniffer... is 'My.product' not also a misude of the dot?

'tis, but the difference is that it doesnt make you see (as opposed to read) the two words differently imo. The dash connects them and is quite awkward, especially if there's more than 2 words

annej

7:40 am on Apr 23, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The new, smaller, non-established site is the one I renamed a bunch of files on.

That's different, no problem renaming those pages. I know a lot of people read who never message though and I wanted to be sure some of them didn't start a mass URL renaming without understanding the whole picture.

fathom777

7:32 am on Apr 23, 2006 (gmt 0)

10+ Year Member



I have many of my files named using underscores. I would like to change to dashes, but I do not want to take a big hit. The underscore pages have PR and are listed in the engine. The dashed ones will be brand new.

Wont I take a hit for switching over? Can I do a 301 without dropping in rank? What would you do?

Thanks!

g1smd

7:30 pm on Apr 23, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Use hyphens or dots for new pages. Leave old pages exactly as they are (unless they don't rank, or are badly indexed).

If you really have to change some pages, then use a single regex redirect from underscore URLs to dot or hyphen URLs to catch all visitors still using old listings, old links, and old bookmarks.

Robert Charlton

4:14 am on Apr 24, 2006 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



When I saw all those hyphens in Matt's blog page filenames, it was a signal to me that Google really didn't pay much attention to words in filenames, so it really doesn't matter which way you do it.

We could argue that hyphens help when the url is in anchor text, but how many times does anyone get a url-link to an inner page? And who uses urls as anchor text in their onsite navigation.

As for the domain name, a little off-topic but it's getting mentioned... I've always felt that the domain name boost is largely about your company name, and that's what gives you the biggest boost. Only about 10% or so, if even that many, of home page inbounds I see are domain name links. Many of my clients have multi-word, non-hyphenated domain names and they do just fine with them.

This 57 message thread spans 6 pages: 57