SitePoint Sponsor

User Tag List

Results 1 to 15 of 15
  1. #1
    SitePoint Enthusiast
    Join Date
    May 2006
    Posts
    86
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    SEO url question

    I understand that it is good to use hyphens in the url such as

    http://www.keyword.com/keyword-keyword

    However, is it ok to use http://www.keyword.com/keyword keyword/index.html

    Notice the space in between keyword and keyword. I have been using this for some time now and it would be hard to change. Thanks for the input.

  2. #2
    He's No Good To Me Dead silver trophybronze trophy stymiee's Avatar
    Join Date
    Feb 2003
    Location
    Slave I
    Posts
    23,423
    Mentioned
    2 Post(s)
    Tagged
    1 Thread(s)
    Space in URLs in bad form. Definitely switch to using hyphens. Mod_rewrite should make switching very easy to do.

  3. #3
    SitePoint Wizard silver trophy linkin99's Avatar
    Join Date
    Sep 2005
    Location
    Wisconsin
    Posts
    1,456
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If you don't like hyphens, you could use underscores to separate keywords, but Google parses keywords with hyphens. So that's the better method. The others can parse keywords using underscores.

  4. #4
    SitePoint Wizard gold trophysilver trophybronze trophy dc dalton's Avatar
    Join Date
    Nov 2004
    Location
    Right behind you, watching, always watching.
    Posts
    5,431
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by linkin99
    If you don't like hyphens, you could use underscores to separate keywords, but Google parses keywords with hyphens. So that's the better method. The others can parse keywords using underscores.
    Underscores are VERY bad form! Many of the Ses dont recognize underscores as a word seperator!

    Stick with hypens!

  5. #5
    SitePoint Enthusiast deep_3657's Avatar
    Join Date
    Apr 2004
    Location
    Kolkata, India
    Posts
    73
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    use of hyphen would be best, but underscores are atleast better than spaces

  6. #6
    SitePoint Addict
    Join Date
    Nov 2005
    Location
    Minnesota, United States
    Posts
    236
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Either use a hyphen or run the words together like http://www.keyword.com/keywordkeyword.html most larger search engines including google can see these as seperate words as well as the combined word so its like getting two for one.

  7. #7
    He's No Good To Me Dead silver trophybronze trophy stymiee's Avatar
    Join Date
    Feb 2003
    Location
    Slave I
    Posts
    23,423
    Mentioned
    2 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by minnseoelite
    Either use a hyphen or run the words together like http://www.keyword.com/keywordkeyword.html most larger search engines including google can see these as seperate words as well as the combined word so its like getting two for one.
    From the Search Engine Optimization FAQ:

    Which is better for domain name and/or url: hyphen (-), underscore(_), or plus sign(+)?

    Hyphens are the best keyword delimiter you can use in your domain name or URL. Hyphens are universally accepted as a keyword separator by all major search engines. Yahoo and MSN do recognize the underscore (_) as a keyword separator but Google does not. As Google has the lionshare of the search market its methods must take presedence and thus hyphens should be chosen to separate keywords.

    Source: http://www.mattcutts.com/blog/dashes-vs-underscores/

    Many say that separators are not necessary as search engines can find keywords in URLs without assistance. Also untrue. Well, not entirely. They are smart and most likely can pick some keywords out of a URL. But they are not that smart. Sometimes it is not obvious where one keyword ends and another begins. For example: expertsexchange.com can be seen as "experts exchange" and "expert sex change". These are obviously two very different topics. In this case a hyphen would clearly separate the keywords and solve this problem.

  8. #8
    Once I was a Factory Worker goofy's Avatar
    Join Date
    Dec 2004
    Location
    Sydney Australia
    Posts
    559
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Use the hyphen.
    Goofy
    Life is what you make it!
    Follow your dreams!

  9. #9
    SitePoint Enthusiast
    Join Date
    May 2006
    Posts
    86
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    can anyone tell me how to do it via underscores instead of spaces? my urls that is. The cms I use automatically creates spaces.

  10. #10
    He's No Good To Me Dead silver trophybronze trophy stymiee's Avatar
    Join Date
    Feb 2003
    Location
    Slave I
    Posts
    23,423
    Mentioned
    2 Post(s)
    Tagged
    1 Thread(s)
    A simple mod_rewrite should take care of that. I'm moving this thread to the Apache forum where our Apache gurus can help you.

  11. #11
    Certified Ethical Hacker silver trophybronze trophy dklynn's Avatar
    Join Date
    Feb 2002
    Location
    Auckland
    Posts
    14,653
    Mentioned
    19 Post(s)
    Tagged
    3 Thread(s)
    Thanks, John!

    For what it's worth, mod_rewrite treats hyphens a bit differently than underscores so I've kept to using _ to separate keywords. 'Guess I'll have to change, eh?

    Okay, Apache will NOT accept blank spaces in a URL so YOU must reformat your links BEFORE presenting them to visitors. My tutorial (see signature) provides PHP code to do this (for underscores) AND provides the "return code" to use to convert the hyphens back to spaces. Note, though, that any hyphen native to the original text will ALSO be converted to a space (ergo my preference for _)!

    Regards,

    DK
    David K. Lynn - Data Koncepts is a long-time WebHostingBuzz (US/UK)
    Client and (unpaid) WHB Ambassador
    mod_rewrite Tutorial Article (setup, config, test & write
    mod_rewrite regex w/sample code) and Code Generator

  12. #12
    SitePoint Enthusiast
    Join Date
    May 2006
    Posts
    86
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by dklynn
    Thanks, John!

    For what it's worth, mod_rewrite treats hyphens a bit differently than underscores so I've kept to using _ to separate keywords. 'Guess I'll have to change, eh?

    Okay, Apache will NOT accept blank spaces in a URL so YOU must reformat your links BEFORE presenting them to visitors. My tutorial (see signature) provides PHP code to do this (for underscores) AND provides the "return code" to use to convert the hyphens back to spaces. Note, though, that any hyphen native to the original text will ALSO be converted to a space (ergo my preference for _)!

    Regards,

    DK

    I'm confused about your tutorial, maybe you can help me out. I am using this code

    $name="$row[name]";

    however, the name from the database has a space, such as "John Smith"

    I am not sure how to use this code

    $county=str_replace(' ', '_',$country);

    to correct the space in the name. Any help on where to place this bit of code and some explanation would be helpful.

  13. #13
    Certified Ethical Hacker silver trophybronze trophy dklynn's Avatar
    Join Date
    Feb 2002
    Location
    Auckland
    Posts
    14,653
    Mentioned
    19 Post(s)
    Tagged
    3 Thread(s)
    Kev,

    That's a simple bit of PHP code which will replace every occurance of the space in the first string with the _ contained in the second string in the target string. That will result in "John_Smith" in your example. When you get the POST value back, simply reversing the process will return "John Smith" to you for use in searching yoru database.

    Regards,

    DK
    David K. Lynn - Data Koncepts is a long-time WebHostingBuzz (US/UK)
    Client and (unpaid) WHB Ambassador
    mod_rewrite Tutorial Article (setup, config, test & write
    mod_rewrite regex w/sample code) and Code Generator

  14. #14
    SitePoint Enthusiast AZOR's Avatar
    Join Date
    May 2006
    Posts
    70
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Imho, definitive best is :
    http://www.keyword.com/keyword-keyword
    with hypend and without /index.php. (by w3c.org)

    Can anyone know what is better :
    href="/keyword" or : href=full_URL/keyword.
    Please, if I help you with something and you have
    some seconds free time, please try correct my english, thx.
    Social Engineering - Security Portal - 0 from Adware

  15. #15
    He's No Good To Me Dead silver trophybronze trophy stymiee's Avatar
    Join Date
    Feb 2003
    Location
    Slave I
    Posts
    23,423
    Mentioned
    2 Post(s)
    Tagged
    1 Thread(s)
    Use the full URL as that is what the search engines recommend to limit crawling errors.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •