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 / Google / Google News Archive
Forum Library, Charter, Moderator: open

Google News Archive Forum

This 50 message thread spans 2 pages: 50 ( [1] 2 > >     
Differences between "-" and "_" in URL

 7:03 am on Apr 23, 2003 (gmt 0)

Hi guys...

I was just wondering of what is the differences between Hyphen and Underscore in the URL. Does "_" means space while "-" make the word become one. Because I used to check Keyword density of some of my competitors and I found that URL that use 'hyphen' will represent as one word..

Ex. www.domain-name.com/main-key-word.html

In this case, Keyword density analyzer will show that there are 2 words in this URL and 1 is keyword (main-key-word). So I just confuse about this and... what will it be if they use "main_key_word" instead. Anyone?



 7:25 am on Apr 23, 2003 (gmt 0)

Not neccessarily. But its good to avoid underscores in urls as much as possible because it is quite difficult to detect the underscore if the url is hyperlinked on a page.


 7:35 am on Apr 23, 2003 (gmt 0)

I have no idea about how your density analyzer treats them. But Google treats a them quite differently. A hyphen is the same as a space, but an underscore isn't.


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

Now I'm getting confused....

I thought that - and _ were treated in much the same way. For example:

widget.com/any_one_for_widgets.htm is the same as widget.com/any-one-for-widgets.htm

with respect to search engines.

Interestingly (?) on a test domain we tried:


but that didn't work too well with any of the search engines for some reason...won't be doing that again!

Any clarification of a definitive nature would, I am sure, help a few of us to get things right!



 7:41 am on Apr 23, 2003 (gmt 0)

Welcome to WebmasterWorld, cyclob!

To expand on what WebGuerilla wrote, Google treats "main-key-word" as three words, "main", "key" and "word". On the other hand, "main_key_word" is treated as a single long word.


 7:58 am on Apr 23, 2003 (gmt 0)

Hi Mohamed,

Can I get this 100% right (scuse the slowness but it is 8.30am here)

If I want to optimise on google for the phrase blue widgets, I am best to set up widgets.com/blue_widgets.htm.

If I want to optimise for the keywords blue red widget widgets (I should do separate pages in an ideal world I know) I would fo widgets.com/blue-red-widget-widgets.htm

Is that right?

Cheers for the clarification



 7:58 am on Apr 23, 2003 (gmt 0)

So, what should I do to get the most density if I want to set my URL...

1. www.domainname.com/main-key-word.html


2. www.domainname.com/main_key_word.html

Note: The word " main key word " is my major keyword and search term.

And Mohamed_E, from what you said it means that on No.1 - there will be 4 words in the URL (domainname, main, key, word) ... and 1 is my keyword..

But for No.2 - there will be 2 words in the URL.. (domainname, main_key_word)... and 1 is my keyword, am I right?


 8:07 am on Apr 23, 2003 (gmt 0)

Underscores will not produce a keyword phrase match in a file name. Hyphens will not.

You can verify it by doing an allinurl search.

just type in

allinurl: "your keyword phrase"

You will not find any file names containing underscores in the results.


 8:09 am on Apr 23, 2003 (gmt 0)

My understanding...

main-key-word.html is read as 'main key word'

main_key_word.html is read as 'mainkeyword'


 8:21 am on Apr 23, 2003 (gmt 0)

> If I want to optimise on google for the phrase blue widgets, I am best to set up widgets.com/blue_widgets.htm.

No. "blue widgets" is a phrase with two words, blue_widgets is a single word, as is bluewidgets. Think of therapist, it does not match "the rapist". Neither does the_rapist.

Let us get away from examples and look at how things are parsed. Hyphen is a word separator, just ike a space. Underscore is a character, just like 'w', for example. It may appear to separate words on the screen, but for Google it is just another character.

How do we know? WebGuerilla's test, using allinurl, shows that clearly.


 9:18 am on Apr 23, 2003 (gmt 0)

So to get a straight answer is MHes right in saying

main-key-word.htm = main key word
main_key_word.htm = mainkeyword


 9:29 am on Apr 23, 2003 (gmt 0)

> main-key-word.htm = main key word


> main_key_word.htm = mainkeyword

No. mainkeyword is a single word with 11 characters, main_key_word is a single, different, word with 13 characters. Neither bears any relation to 'main', key' or 'word'.

This applies to Google, I have no idea how other search engines treat hyphens and underscores.


 9:31 am on Apr 23, 2003 (gmt 0)

Does pagename *really* matter? I mean does google give that decent weight in its algo usually?



 9:36 am on Apr 23, 2003 (gmt 0)

Mohamed_E - thanks! I understand now.


 9:38 am on Apr 23, 2003 (gmt 0)

Thanks Mohamed_E, great clarification. I'm guessing that a few of us are working that global replace button pretty hard. Also time to make sure I am 100% certain on robots.txt cos there are quite a few 301's that need to be set.


 9:45 am on Apr 23, 2003 (gmt 0)

Thanks Mohamed_E

Fully understood and very usefull


 10:14 am on Apr 23, 2003 (gmt 0)

Thanks Mohamed,

Bollox - that's a whole heap of pages (8,000) that will have to be changed - but worth it for the google-machine!

TW ;-)


 10:56 am on Apr 23, 2003 (gmt 0)

Bad news, guys.

I finished yesterday changing "mainkeyword" to "main_key_word" on over 3000 pages :(. I'll restart my hard work today.


 10:56 am on Apr 23, 2003 (gmt 0)

> Does pagename *really* matter? I mean does google give that decent weight in its algo usually?


That is the $64,000 question. Google almost certainly gives the file name some weight, the question is how much. Many would say that any weight is useful, I am not so sure.

For what it's worth, I use hyphens in new files, but have not renamed old ones that have underscores. A project that is on the very back burner for a slow day.


 11:05 am on Apr 23, 2003 (gmt 0)

Does pagename *really* matter?

Page name matters. Don't know how much.

But if keywords in page name, keywords in H-Tags, keywords in content a.s.o. AND keywords in inbound links match: that's very nice.


 11:52 am on Apr 23, 2003 (gmt 0)

Right... thinking forward and with all the comments here about the page url's being important with respect to the -'s - for keyword phrases, what impact will folder names - if any?

I have a CMS that allows me to name and create files and pages and as we will now be changing things to incorporate the -'s , not the _'s, I am wondering whether folders have any weight within web-positioning?

Looks like I have planning to do this weekend.




 12:53 pm on Apr 23, 2003 (gmt 0)

Several of my pages are optimized for a hyphenated numeric keyphrase. For example (this isn't a real one) 12-345.html is optimized for phrases including 12-345. But in my niche, the 12 is understood, so some people search for just 345. My page comes up for those searches as well.

My geocities user name includes an underscore (it came from my Yahoo ID) and if I search allinurl for the part of that before the underscore, I don't get anything. FWIW, that word also shows up before an "'s" in the pages.

Mine is just one example, but it leads me to believe that hyphens are treated as separators but underscores and apostrophes are not.


 1:04 pm on Apr 23, 2003 (gmt 0)

Why not use + instead of - as a separator?


 1:15 pm on Apr 23, 2003 (gmt 0)

But if keywords in page name, keywords in H-Tags, keywords in content a.s.o. AND keywords in inbound links match: that's very nice.

Does this count for the PR calculation or just gives you a chance to be listed closer to top on SERP's?

To make it simple, imagine a site that recieves only one outside link from a PR5 site (or page), for example. The PR5 site only links to the first site, so the first site must be ranked PR4. Following the rules on the top of the message, will the PR increase?

Thanks in advance for your time


 1:47 pm on Apr 23, 2003 (gmt 0)

Gonzalez, welcome to WW.

The on-page factors are the biggest issue in placing high in the SERPs. They define which pages are relevant to the search.

PR is an improved version of the old link popularity. It helps decide among the relevant sites which are the most important.

IMO, PR is a secondary issue. Basic SEO on the page comes first.


 3:56 pm on Apr 23, 2003 (gmt 0)


If you currently use underscore I would not go changing hundreds of file names just for the chance that keywords in the file name will increase your ranking. I think it can help, but is only another tiny factor.

If these pages are already indexed then live with it. I think it would be crazy to allow them to be dropped, better to just make new pages, new content, and remember to use ' - ' instead.

If a page is in Google NEVER drop the file name.... just move on with new and better stuff.

In my honest opinion.....


 8:18 am on Apr 24, 2003 (gmt 0)


That's really sad! I have "_" on all of my filenames and I used to think that it has the same advantage as the "-". Now I am confused, should I change all the filenames or should I just keep them as they are? I do not want to miss any factor of advantage.

I feel that Google should start treating underscores in filenames as spaces. There are so so so many sites out there who are using underscores as separators, inclusing the Dmoz and Yahoo directory (and even Google directory, for that matter).

What could be the reason that google doesn't consider underscores as spaces?

Anyone out here who can convince the Google people to start considering underscores as spaces! GoogleGuy, are you there. ;)


 8:39 am on Apr 24, 2003 (gmt 0)

I'd like to re-ask a question from further up which I think wasskipped.

How does "+" fit into the equation?

I have a dynamic syte which lists things like:


since the database stores things in proper english, like
Widget Category
Widget & Wodget Category
Widget's Wodgetty, Thingies

so the URLs ("static" style urls) have the usual URLENCODING in them:

They seem towrok well enough, and make the most sence to users (rather then changing them "randomly" by removign certain letters and so on)

But how does Google see them?



 8:48 am on Apr 24, 2003 (gmt 0)

No wonder my serps are crap, been using underscore all the time!


 9:33 am on Apr 24, 2003 (gmt 0)


this discussion is rather frustrating because when I search for most anything, I see far more results that have urls packed with "_" than with "-". (Try some searches and look at the first 100 results for yourself)

Perhaps this is because far more people code pages with "_" than "-"? I don't know. If "-" has such an advantage over "_" why don't I see it in the serps more often?

It may be true that google reads "-" as a space and "_" as a character, but if you go overboard with something like www.domain.com/kw1-kw2-kw3-k4-k5.html maybe google views that as a bad kw stuffing attempt? Whereas www.domain.com/kw1_kw2_kw3_kw4_kw5.html gets no positive effect but attains no penalty either -- thus remains ahead?

Thoughts? I'm speculating only.

This 50 message thread spans 2 pages: 50 ( [1] 2 > >
Global Options:
 top home search open messages active posts  

Home / Forums Index / Google / Google News Archive
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