SitePoint Sponsor

User Tag List

View Poll Results: What is the best website structuring technique?

Voters
38. You may not vote on this poll
  • Put each page in it's own folder or subfolder and name it index.html

    3 7.89%
  • Name each page it's name.html and put them all in one directory

    11 28.95%
  • Depends on the size of the site

    24 63.16%
Results 1 to 18 of 18
  1. #1
    Git-R-Done
    Join Date
    Nov 2001
    Posts
    1,194
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Website Structure?

    I was wondering what the best way to set up the structure of a website. In the past I've always set up my sites so each section has it's own folder then each subsection's folder is within that folder. This makes it easier when logging into the account because the files aren't all in one directory and it's easier to find things.

    Now I'm starting to wonder if it's better to just name each page a different name and keep all the files in one directory. Here's how I have always set it up:

    Home
    Products
    -->Widget 1
    ---->Sizes
    ---->Colors
    -->Widget 2
    -->etc
    About
    -->Corporate Info
    -->History
    Contact

    Each page I would name index.html and put it in it's own folder. So for the colors page of widget 1, I'd like to it like products/widget1/colors/index.html.

    Would it be better to just put them all in the main directory and name it widget1_colors.html.

    I just wanted a some suggestions as to what is best.
    John Saunders

  2. #2
    SitePoint Wizard
    Join Date
    Oct 2001
    Location
    Lancaster, PA
    Posts
    3,019
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    It all depends...

    ...on the size of the site.

    I'd say if it's a small site, something less than maybe 20 pages or so, it's ok to lump everything together under one folder. Larger than that though, I think it would probably get messy pretty quickly if you didn't separate pages based on the sections they're in.

    Just my .02 cents!

    Cheers,

    Steve
    Web Designer or Small Business Owner?
    Need More Leads and More Clients?
    Get Free Marketing Tips, Tricks and Ideas Here!

  3. #3
    gingham dress, army boots... silver trophy redux's Avatar
    Join Date
    Apr 2002
    Location
    Salford / Manchester / UK
    Posts
    4,838
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i'd also say it depends, but would have an almost opposite approach to Ravedesigns...
    if it's small-ish (20 odd pages), i'd go for separate directories consistently. however, once the project gets really big, this may become impractical, and i'd start bunching up related pages with name.ext in big top level groups of folders...at least i can give them very descriptive names, which sometimes is not an option if you lump everything into the site root.
    re·dux (adj.): brought back; returned. used postpositively
    [latin : re-, re- + dux, leader; see duke.]
    WaSP Accessibility Task Force Member
    splintered.co.uk | photographia.co.uk | redux.deviantart.com

  4. #4
    SitePoint Enthusiast Wicksie's Avatar
    Join Date
    Aug 2002
    Posts
    44
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    personally i keep all .htm in root

    all images in their own relevant directories within the Assets directory

    all php under the main php directory then subdivided etc

    not sure if it helps - but that is how i do it

    cheers

    wicksie

  5. #5
    SitePoint Guru
    Join Date
    Jul 2000
    Location
    Long Island, NY
    Posts
    755
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I prefer to keep the html files in root if practical. I like to organize them by naming conventions rather than folders.

  6. #6
    SitePoint Enthusiast
    Join Date
    Aug 2002
    Posts
    74
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The closer you stay to the root/domain the better for your SE position. I keep all my pages in the same folder and name the pages after the search term, for example .../expired_yahoo_domain_services.htm. It's really boosted my SE position

  7. #7
    . Ruchir's Avatar
    Join Date
    Feb 2002
    Location
    Sydney
    Posts
    1,863
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    aahhhh, back after a long time.. i'd prefer it in folders of the category required..... i mean i'd never go for keeping everything in the root.... makes the site structure tend to get too complicated when it comes to editing.... keeping it in the folders of categories means u know where to go for what file whenever u want updates and stuff... so having folders for different categories helps !!!!
    Peace.

  8. #8
    SitePoint Guru
    Join Date
    Jul 2000
    Location
    Long Island, NY
    Posts
    755
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If it's a really big site then it's probably necessary to use folders. If it's around a hundred pages or less then you can accomplish that with naming conventions. For instance, in a photo gallery section, all the pages there are "photos_filename" and so forth. If it's not too huge it's just as easy to find everything that way. On the other hand if it's a site with thousands of pages, you'd probably want subdirectories.

  9. #9
    SitePoint Wizard
    Join Date
    Aug 2002
    Location
    N.Ireland
    Posts
    1,046
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm brining this topic up again as I'd appreciate more input. Government guidelines which I have to work to say every main section on your site should have a subfolder, so essentially the only page that should sit in your root folder is your index page.

    Opinions please?

  10. #10
    SitePoint Enthusiast Wicksie's Avatar
    Join Date
    Aug 2002
    Posts
    44
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Daz
    I'm brining this topic up again as I'd appreciate more input. Government guidelines which I have to work to say every main section on your site should have a subfolder, so essentially the only page that should sit in your root folder is your index page.

    Opinions please?
    hi Daz

    my god, this has been resurrected hasn't it

    i originally posted above and my method still remains the same (that is, for my own work)

    like you, i have to abide to government regs too for other work - MOD and NATO

    and yes, there are some very strange suggestions/rules out there for this - in global (NATO) world there is a certain amount of leeway

    but on UK MOD intranets there is very very little room for manouvre (are you referring to .gov sites or intranets)?

    on the intranet side, most of the time developers are forced to use specific Web apps that have been modded for their own ends - definately not user friendly and not very nice either

  11. #11
    Robert Wellock silver trophybronze trophy xhtmlcoder's Avatar
    Join Date
    Apr 2002
    Location
    A Maze of Twisty Little Passages
    Posts
    6,316
    Mentioned
    60 Post(s)
    Tagged
    0 Thread(s)
    It not the size that counts it's what you do with it that matters... basically to some extent it depends on how you like to organise and work with your files.

    I tend to keep few sub directories but then the largest only has 190 files of various types held within it (classified on site topic area) I find them easily manageable like that rather than having specific image directories, etc.

  12. #12
    SitePoint Wizard
    Join Date
    Aug 2002
    Location
    N.Ireland
    Posts
    1,046
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi Wicksie, I'm referring to OoE guidelines for Internet sites which apparently say you should have folders for every section. They also say you should have one folder for your images/pics, one for css called style, one for javascripts called js.

  13. #13
    SitePoint Enthusiast Wicksie's Avatar
    Join Date
    Aug 2002
    Posts
    44
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Daz
    Hi Wicksie, I'm referring to OoE guidelines for Internet sites which apparently say you should have folders for every section. They also say you should have one folder for your images/pics, one for css called style, one for javascripts called js.
    how off the wall is that?

    are they open to discussion through the chain?

  14. #14
    SitePoint Wizard
    Join Date
    Aug 2002
    Location
    N.Ireland
    Posts
    1,046
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well the guidelines are quite funny as not only are they silly in places but the OoE themselves don't even follow them!

  15. #15
    SitePoint Addict Scud's Avatar
    Join Date
    Jan 2002
    Location
    Los Angeles
    Posts
    222
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    all about the size of the site and your ability to work with what you make. If you find it hard to manage files when they are lumped together, go for it and stick them in their own folders.

    This of course makes it easier to break things with all the linking, so make sure to use relative links too.

  16. #16
    SitePoint Wizard
    Join Date
    Mar 2002
    Location
    Bristol, UK
    Posts
    2,240
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Imho, it depends on the size of the site.

    From the point of view of a webmaster, directories are great for organising files when you're dealing with hundreds of pages, but with just a few pages it increases the hassle when trying to navigate around the directory structure, i.e. while using FTP or Windows Explorer [img]images/smilies/smile.gif[/img]

    -Sam
    Last edited by Devilware.net; Oct 2, 2003 at 11:24.
    Sam Hastings

  17. #17
    SitePoint Wizard DougBTX's Avatar
    Join Date
    Nov 2001
    Location
    Bath, UK
    Posts
    2,498
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You could probably write a mod_rewrite rule to fake the folders, so the user sees http://doain.net/folder/ but really the file is http://doain.net/folder.htm (or whatever makes sence from the structural point of view. The pages could even be in a DB). That way you would get the best of both worlds. If you write your rules well enough, you could even make it so that you don't have to worry about updating the rules when you add pages.

    Just a thought.

    Douglas
    Hello World

  18. #18
    Huh? What now? tntcheats's Avatar
    Join Date
    Aug 2003
    Location
    BC, Canada
    Posts
    719
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quite a few websites use those mini-folder pics on their sites. aka flashkit.com though theirs is different from most sites.


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
  •