| What are subdomains? Are they necessary for web sites? |
What are subdomains?
Subdomains are the third level domains that are used to
organise your web site content.
They are just like folders under your root directory.
But they will have a special URL to access.
http://www.yoursite.com
is a regular URL with out a subdomain.
http://products.yoursite.com
is an URL with subdomain "products".Here the:
- .com is the first level domain
- yoursite is the second level domain
- products is the third level domain
What is the purpose of subdomains?
1.You can organise your web site.Like support,help and FAQ
at 'http://support.yoursite.com'.And your products and order
links under 'http://store.yoursite.com' etc.
2.If you have members or you want to share your disk space
with your friends, you can create a subdomain for each of them
and give access with their own user name and password.
3.You can also organise the email addresses that comes to
seperate departments on your web site.Like support@support.yoursite.com
orders@store.yoursite.com etc.
4.Long URLs are cut short to a subdomain, so it is easy to
remember the short URL instead of long URLs.
Especially this is true with your affiliate links which are long
and with many special characters like '?','&' etc.This is difficult
to remember.So in these cases creating a subdomain for that
long URL helps to remember it well.
Where to get subdomains?
Your host could provide subdomains for you.Number of subdomains
that are alloted for you depends on the type of hosting plan you
are using.
You can use 'subdomains' icon or text link in your control
panel to create,delete and edit your subdomains.
If your host doesn't offer subdomains then you can get them free
with free domain offering services.They will give you free
subdomains which redirect the visitors to your particular
URL.But they will keep an advertisement on your subdomain URL.
Search for 'free subdomains' in your favorite search
engine.You will get a list of web sites that offer sub domains to
people.You can choose the one you want.
Caution:
If you offer subdomains to your members or friends means you
are responsible for the band width and disk space usage.
Think twice before giving access to your cgi-bin because your
subdomains have seperate cgi-bins.
What will be the paths to files and cgi script?
If you have an image 'logo.gif' under 'support' subdomain then you can
keep your image file path as:
'http://support.yoursite.com/logo.gif'
'http://yoursite.com/support/logo.gif'
'/logo.gif'
But NOT like this:
'/support/logo.gif'
Same with the cgi-bin too.
The path to cgi files should be:
'/public_html/support/cgi-bin/scriptname.cgi'
(this first path varies on different servers.On some it is 'public_html'
and some '/home/username-www/')
The URL for cgi files will be:
'http://support.yoursite.com/cgi-bin/scriptname.cgi'
'http://yoursite.com/support/cgi-bin/scriptname.cgi'
|