Should all of the HTML files go in one folder and all images in another?
If you have a small site and only a handful of each, this could be a simple
way to go. But as your site grows, so will the number of files, and sorting
them into subcategories will make them simpler to locate and change. Think
about alternatives that make sense for your particular setup. What about
grouping the files by model, so each product has its own folder? Or you
could organize everything by date, if you are constantly adding new content.
There is no right or wrong way to organize this stuff. It's all up to
you. But if you're in charge of maintaining the site, you'll want the
structure to make sense to you. Just think about the type of content you'll
be dealing with and map out the backend accordingly.
You should also be mindful of the names of your files and directories
(directory is another word for folder basically, it's just a
container for files). When you're first building a site, you probably don't
give a whole lot of thought to that type of stuff you just name
everything something that's intuitive to you so you don't need to sit and
remember what each file or folder contains. But the people who visit your
site may find your nicknames and shorthand a little baffling.
"But, hey," you might say. "We're just talking about filenames. Users
will never see any of that stuff, except in the URLs, and who pays
attention to that garbage anyway?" But users often do look at URLs, and
some use them to navigate. Somebody could do a search and end up at a page
deep within your site, and then he or she might get back to the root level
by erasing all the extra stuff from the URL. For example, a user might cut
http://www.stapler-co.com/guns/themonster.html down to http://www.stapler-co.com/guns/, hoping to
see a complete list of stapler guns. If the URLs are nonintuitive, then
that is just one more barrier between visitors and the content they want
and such barriers are to be avoided whenever possible.
It's also better to have short, memorable names, resulting in URLs that
roll off the tongue, than names leading to URLs that have to be scrawled on
two or three pieces of paper. Remember to pay attention to case too.
Depending on what type of server your site is on, "a" can be an entirely
different animal than "A".
To keep things consistent and simple, use lowercase letters for all
folder and filenames. Servers tend to get confused by strange filenames, so
be kind to them. Don't use spaces or questionable characters (like |,
&, *, %, etc.). Only use periods before the extension (like
.html or .gif), and don't include more than one extension in your filename:
OK: deluxe_model_stapler.gif
Not OK: deluxe.model.stapler.map.gif
next page»