Welcome to the JaguarPC Community
JaguarPC
Sales: (888) 338-5261
Support: (888)-551-3050
Results 1 to 7 of 7

This is a discussion on File Naming guidelines in the Shared & Semi-Dedicated forum
Hi, I've added this post to the forum because I see a fair number of our users struggling with strange file not found issues on ...

  1. #1
    Techinical Support Rep.
    Join Date
    Oct 2008
    Location
    Canada
    Posts
    526

    File Naming guidelines

    Hi,

    I've added this post to the forum because I see a fair number of our users struggling with strange file not found issues on our Linux servers.

    Case-sensitivity

    Many of you are coming from a Windows environment where the file systems are case-preserving.
    This means that Windows remembers the case of a file name but does 'asdf.doc' is still the same file as 'ASDF.DOC'.

    On unix variants such as Linux, FreeBSD, and may others the file-system is case-sensitive.
    This means that 'asdf.doc' is a completely different file from Asdf.doc or even 'asdf.DOC'.

    Special characters

    The following characters have a special meaning in Linux and to avoid confusion they should use only when absolutely necessary.

    & ; | * ? ' " ‘ [ ] ( ) $ < > { } # / \ ! ~

    The space character also has a special meaning but is difficult to show for obvious reasons.

    If you must use a file name with one of these characters you need to escape the character.

    The file name '$test.txt' must be written as '\$test.txt'. Any of the above special characters can be escaped by prefixing it with a \.

    Example style suggestions

    As as result of these differences you should adopt a naming style that works on both systems. The style should be consistent and easy to remember.

    I recommend and use a simple system of making all file and folder names lower-case and using an underscore instead of a space. I've never needed to use any of the other special characters when naming a file.

    Example file:
    'My trip Around the world.html'
    This would be written as 'My\ trip\ Around\ the\ world.html' if you needed to escape it.
    This is how it would show up in a browser: 'http://example.net/My%20trip%20Around%20the%20world.html' Not pretty.
    This is how I would name it: 'my_trip_around_the_world.html'
    Last edited by JPC-NickO; 02-10-2009 at 01:11 AM.
    I do work for JaguarPC. If you do need help please provide your ticket number (this isn't sensitive information).

    If I'm not active on the forum please open a ticket instead of PMing me. If you think the issue requires access to your server please open a ticket.

  2. #2
    Community Leader jason's Avatar
    Join Date
    Sep 2001
    Location
    Rochester, NY
    Posts
    6,003
    One recommendation that I've seen a couple of places it to use dashes in place of underscores in file names. Since URL's (in email messages, on websites, etc.) are typically underlined, it can be difficult tell if a filename contains underscores or spaces (especially for someone not familiar with how URLs work). If you use dashes, this problem is eliminated.

    --Jason
    Jason Pitoniak
    Interbrite Communications
    www.interbrite.com www.kodiakskorner.com

  3. #3
    Old Hillbilly Connie's Avatar
    Join Date
    Sep 2001
    Location
    Hills of Missouri
    Posts
    2,648
    In addition to what Jason mentioned SEs treat words joined by a underscore as one word. They will treat words separated by a hyphen or period as separate words.

    Forum Moderators - Jag Staff

    Spam Whackers Blog - Dedicated to fighting Spam and providing General SEO Tips
    Organize your Kitchen or purchase Kitchen Accessories at Condells
    Ihelpyou Forum - Dedicated to "Best Practices" SEO

  4. #4
    Community Leader jason's Avatar
    Join Date
    Sep 2001
    Location
    Rochester, NY
    Posts
    6,003
    Quote Originally Posted by Connie View Post
    In addition to what Jason mentioned SEs treat words joined by a underscore as one word. They will treat words separated by a hyphen or period as separate words.
    I was not aware of that. Interesting.

    --Jason
    Jason Pitoniak
    Interbrite Communications
    www.interbrite.com www.kodiakskorner.com

  5. #5
    Ron
    Ron is offline
    Loyal Client
    Join Date
    Aug 2002
    Posts
    7,307
    That's not accurate when it comes to Google, Connie. 100% guaranteed from both personal experience as well as a blog post by Matt Cutts. It may have been the case at one time, but it hasn't been the case in several years at a minimum.
    Good luck

  6. #6
    Old Hillbilly Connie's Avatar
    Join Date
    Sep 2001
    Location
    Hills of Missouri
    Posts
    2,648
    Ron this is what Matt said in a block post in 2005 Dashes vs Underscores. He has mentioned it several times since then and I haver never read anything any different. I could have missed something.

    Be glad to read where Google has Google or a Google rep has said anything different if you care to post a link.

    From Googles Webmasters/Site owners Help on URL structure.
    Consider using punctuation in your URLs. The URL http://www.example.com/green-dress.html is much more useful to us than http://www.example.com/greendress.html. We recommend that you use hyphens (-) instead of underscores (_) in your URLs.

    Forum Moderators - Jag Staff

    Spam Whackers Blog - Dedicated to fighting Spam and providing General SEO Tips
    Organize your Kitchen or purchase Kitchen Accessories at Condells
    Ihelpyou Forum - Dedicated to "Best Practices" SEO

  7. #7
    Ron
    Ron is offline
    Loyal Client
    Join Date
    Aug 2002
    Posts
    7,307
    Stephan Spencer's Article:
    http://news.cnet.com/8301-10784_3-9748779-7.html
    One key development that Matt shared with the audience was that underscores in URLs are now (or at least very soon to be) treated as word separators by Google.
    Then Matts follow up to that article:
    http://www.mattcutts.com/blog/2007/08/page/2/
    If you read Stephan Spencer’s write-up, he says some people thought that underscores are the same as dashes to Google now, and I didn’t quite say that in the talk. I said that we had someone looking at that now. So I wouldn’t consider it a completely done deal at this point. But note that I also said if you’d already made your site with underscores, it probably wasn’t worth trying to migrate all your urls over to dashes. If you’re starting fresh, I’d still pick dashes.
    Again, I can tell you from personal experience that underscores are treated as word sepatators. If you don't believe me at this point, that's fine, we'll agree to disagree.
    Good luck

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
  •