Designing Your Websites Directory Structure

Any kid, and their grandmother too, can make a webpage. There are many "wysiwyg" webpage design applications that let you create a webpage as easy as typing text. But only a few people can create a WEBSITE. The stumbling block is knowing how to link webpages together to form a website. I have seen many websites that consist of a single webpage - about a mile long!

The first problem is that websites are contained in virtual directories. You know that your webpages can be found at yourdomain.com, but the actual path to yourdomain.com on the web server may be known only by the system administrator. And the system administrator can move your website to a different folder, or even a different computer, without changing its virtual address.

The second problem is that most people don't know how to write a relative link. Relative links have the advantage that you don't need to know the path to the webpage that you want to link to, you only need to know where it is "relative" to the webpage containing the link.

Designing Your Directory Structure

The first step to implementing a website is to design the directory structure. Let's design a directory structure for a simple download website. The website consists primarily of articles and digital material that visitors can download. You could just dump everything at the top level of the website. Good luck maintaining that website!

To keep the files organized, you need to create sub-directories (folders) on the website. Even though the website consists only of articles and digital downloads, you need five sub-directories, as described below.

  • articles

  • downloads

  • general

  • common

    cgi-bin

You understand what the "articles" and "downloads" sub-directories are for, but what are the other three sub-directories for? It's standard practice to provide certain features on your website, as listed below.

  • About

  • Contact

  • FAQ

  • Privacy Policy

  • Search

  • Sitemap

  • User Agreement

Each of these features requires a webpage. Instead of dumping the webpages at the top level of the website, or mixing them in with articles or downloads, let's put them together in a folder named "general" (I'm sure you can think of a better name).

All of your webpages use certain things in common, for example, your logo graphic. If your web server provides SSI (Server Side Includes) all your webpages can share a common header file and a common footer file. You might also define all your website's styles in a common style sheet. Let's put all of these files in a folder named "common".

Your contact page might use an email form. If your server provides server-side scripts, you would place the email form script in a folder named "cgi-bin". Cgi-bin stands for "Common Gateway Interface - Binary". Few people use CGI any more, and those that do don't use binary files, but the folder name has stuck as a traditional place to store scripts. Almost all websites come with a preconfigured cgi-bin folder, and the website may be configured so that the cgi-bin folder is the only folder with rights to run scripts.

I would also recommend that you create certain sub-directories for some of the above mentioned directories. Most web pages contain images. You could dump all the images in the same folder with the webpages, but when you get more than about 50 files in a folder, it becomes difficult to maintain. You should create an "images" sub-directory in the articles, downloads, and general directories. The downloads directory should also have a "files" sub-directory to store the downloads.

This arangement of directories and sub-directories will provide good file organization for the example website. Understanding my reasoning for this directory structure should help you to design a directory structure for the website you have in mind.

Default Page Configuration

Every website has at least one default webpage configured (also called the "home" page). The default webpage is the webpage that is returned when the user enters or clicks on a link containing only the domain name, without a specific file name. On a Unix or Linux web server, the default webpage will usually be "index.htm". On a Windows web server (IIS), the default page will usually be "default.asp".

The website administrator, or if your webhost provides the required "control panel" feature, you can actually configure any page to be the default page. If your web server has more than one default page configured, I would recommend removing all but the default page that you intend to use.

Now, let's assume that all of your webpages need to link to an image file named "logo.gif" stored in the "common" folder. The relative link on your default webpage would be as shown below.

"common/logo.gif"

The website file manager interprets this as "look in the folder named common for the file named logo.gif".

However, the link on any webpage contained in one of the sub-directories would be as shown below.

"../common/logo.gif"

The website file manager interprets this as "go up one level, then look down in the folder named common for the file named logo.gif".

This difference in the link may not be a problem unless you use SSI or ASP (Active Server Pages) to build your webpages from a common header file and a common footer file. Then you need a different link in the common file depending upon whether the page linked to the common file is the default webpage (where you would use common/filename) or a webpage contained in a sub-directory (where you would use ../common/filename). There are several ways to solve this problem.

1. If your website has a server-side scripting engine like ASP or PHP and you know how to program, you could implement code that selects the proper link.

2. You could use the complete path, including the domain name, on all pages. This will cause problems if you ever have to move your website to a different web host (Until all the dns servers across the planet have been updated).

3. You could put your home page in a sub-directory, for example "common", and make your default page into a re-direct to your home page. Then you would use "../common/filename" for all links. The following meta tag, placed the head section of your default webpage, will immediately redirect the users browser to your real home page.

meta http-equiv="refresh" content="0,url= "yourdomain.com"

In this article, I showed you how to design a directory structure for your website and how to create relative links to link all your webpages together to form a website. Website visitors don't like to do a lot of scrolling, so try to keep your webpages to only two or three screens high. Please, no more websites that consist of only one mile long webpage!

Copyright(C) Bucaro TecHelp.

Permission is granted for the below article to forward, reprint, distribute, use for ezine, newsletter, website, offer as free bonus or part of a product for sale as long as no changes are made and the byline, copyright, and the resource box below is included.

About The Author

Stephen Bucaro

To learn how to maintain your computer and use it more effectively to design a Web site and make money on the Web visit yourdomain.com. To subscribe to Bucaro TecHelp Newsletter visit yourdomain.com.

limo service at o'hare Carpentersville .. Lockport Chicago limo O’Hare
In The News:

Tech expert Kurt “CyberGuy" Knutsson says a tech support scam used a fake Windows Defender pop-up, tricking the victim to call and download software.
Tech expert Kurt “CyberGuy" Knutsson reveals ways to restore accidentally deleted text messages on your Android phone.
A new study says outdoor security camera apps are among the biggest collectors of user data, including phone numbers, payment details and precise location.
In iOS 18.2 and later, Apple's Mail app enhances email management by automatically sorting messages into distinct categories to help find emails faster.
A virtual private network (VPN) allows computer and smartphone users to mask an IP and create a secure, encrypted connection between a device and the internet.
Android 15's latest feature, Private Space, is like a private vault helping to keep your personal or sensitive apps away from prying eyes.
Cybercriminals have more ways than ever to target teenagers; here are some of the most widespread scams and tricks to watch in order to keep your loved ones safe.
Stay up to date on the latest AI technology advancements and learn about the challenges and opportunities AI presents now and for the future.
A humanoid robot named CUE6 has got game. The basketball-playing robot, produced by Toyota, claimed a Guinness World Record for longest shot.
With electronic signatures becoming more common, Kurt the CyberGuy explains how to produce your digital John Hancock for online documents.
Kurt the CyberGuy walks through steps he recommends immediately taking after getting new electronics — like phones or TVs — as gifts this holiday season.
When speaking becomes physically challenging, you can preserve your unique voice using Apple's Personal Voice and Live Speech technology.
Google Maps is deleting location history soon. Tech expert Kurt “CyberGuy" Knutsson shows you how to back it up before it's gone.
iOS 18.2 lets AirTag owners securely share item locations with trusted individuals. Tech expert Kurt “CyberGuy" Knutsson examines the powerful new feature.
The FBI is warning timeshare owners of a telemarketing scam tied to a Mexican drug cartel. Tech expert Kurt “CyberGuy" Knutsson provides steps to stay safe.
Protecting your home network includes securing your router, just like your phone or laptop. Kurt “CyberGuy" Knutsson reveals six ways to protect your Wi-Fi router from hackers.
Kurt “CyberGuy" Knutsson: ConnectOnCall breach leaks sensitive data of 910,000+ patients.
Rising elder scams: How to recognize them and protect yourself and your loved ones. Tech expert Kurt “CyberGuy" Knutsson helps you outsmart the scammers.
There are common habits and oversights that could leave your financial information vulnerable to cybercriminals, according to Kurt the CyberGuy.
Counting calories just got easier with The Drop, the world's first automated nutrition tracker using advanced computer vision and artificial intelligence.
A virtual private network can help ensure your information remains security and your privacy remains intact. Kurt the CyberGuy explains.
Stay up to date on the latest AI technology advancements and learn about the challenges and opportunities AI presents now and for the future.
Artificial intelligence-based cameras are giving air defense operators unprecedented capabilities in monitoring and protecting airspace.
Apple's iOS 18.1 Inactivity Reboot automatically reboots your iPhone if it hasn't been used or unlocked for more than three days, providing better data protection.
An inventor designed rooftop solar panels for a Tesla that draws solar energy while the car is parked, adding travel mileage without plugging in.

Ten Steps to a Winning Home Page

There's no doubt about it - the first page your... Read More

Use Exclusive Content - When Reprint Articles Dont Do Enough

There is no doubt that reprint articles can serve lots... Read More

Marketing Basics for the Webmaster

What is the relationship between Marketing and Web designing? How... Read More

Double Ad-Trackers Its Not as Crazy as It Sounds Here Are 7 Reasons Why?

A Double Ad Tracker is an Ad-Tracker that points to... Read More

Make Your Site Quick To Load!

The time it takes to load your site can make... Read More

Service Professions: Does Your Website Follow These 5 Simple Rules For Getting More Clients?

There are literally thousands of different options, styles and formats... Read More

Developing An Effective Physical Therapy Web Site

Physical therapists have unique web presence needs. An effective site... Read More

How Do We Know When Its Time To Redesign Our Web Site?

A question we frequently get asked is, "how do we... Read More

12 Essential Web Site Design Tips

1. What's the purpose?The most fundamental thing to do before... Read More

Got Web Traffic but Still Low Sales? Ten Ways to Selling Success - Part 2

Part one of this article is available at ... Read More

Designing Professional Web Pages

If your Web site doesn't project a professional and polished... Read More

Usability Lessons from the Hospital

Usability isn't only for Web design. It's also applicable in... Read More

Welcoming Your Website Visitors

Imagine you're going on a blind date. You've heard wonderful... Read More

Web-Safe Fonts for Your Site

Choosing the right typeface for your website copy is important,... Read More

Don?t Put Your Slogan in the Title Tag - Optimize Your Web Pages

Don't just put your slogan in the title tag when... Read More

Web Design: Should You Hire Someone or Do It Yourself?

So you need a website. You are not sure if... Read More

The Contrast And Similarities Between A Web Designer And Web Programmer

The concept of web designing based on the nature and... Read More

5 Ways To Improve Your Website Immediately

If you are reading this, I assume you either have... Read More

Creating Personal Web Sites (Part 2)

This is the second part of a two-part article about... Read More

Re-Use The Links You Have When Revising Your Site!

Many times I've seen a web site undergo a revision... Read More

Teach Yourself CSS The Easy Way

I taught myself HTML back in the mid-nineties and was... Read More

Plugging the Dreaded World Wide Web Black Hole is Just the First Step

You have created your custom error page so now all... Read More

Wording Up Your Website

Back to basics. Forget funky design, good copywriting is the... Read More

10 seconds is all it takes? (How to grab the attention of your audience with your web site)

FACT: 30 to 60% of visitors tend to drop off... Read More

Top 10 Web Design Mistakes

As a webmaster, you want to keep your visitors content... Read More

Fox River Grove limo rentals ..