I'm just wondering whether it would be appropriate/acceptable to use the following folder naming convention within a website development?

For folders which the end users will see as part of the URL:

  • /Photos
  • /Downloads
  • /Downloads/Documents

(basically, the standard way of naming folders)

... but for folders which aren't seen by the user, but which contain resources used by the website:

  • /_sitegraphics
  • /_js
  • /_xml
  • /Photos/_photosxml

Are there any reasons that prefixing the 'private' folders with an underscore is a bad idea? I'm only considering it because I think it keeps things tidy and easier to identify.

1 Answer 1


I often use a very similar naming convention / separation of system and userland folders. Either using the _ (underscore) or @ (at) to prefix the system folders. Like you say, it makes the folders easier to identify (when arranged alphabetical they are at the top) and I've not come across anything negative to doing it this way.

However, I do try to keep the _/@ system folders to a small core of folders at the root. And subfolders (inside a system folder) use regular folder names.



This is generally for server-side scripts. I don't always do this with JavaScript and CSS - may be for the core files in an application. For server-side script you could always keep them in folders above the document root, then they are truly separated.

  • To be honest, using the convention when they're subfolders was only an afterthought - I can't imagine a situation where it would be needed. Thanks for your response, it was really useful. Aug 6, 2011 at 11:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.