Domain Names, Sub Domains and Addon Domains

66
rate or flag this page

By nicheblogs


What is the Root Directory?

Your hosted site is not so very different in structure to your own computer so far as your public files are concerned. You might like to think of the root directory as the root of a tree. It is the starting point where all the branches originate from. There can only be one root directory for any disk volume and it cannot be deleted. A domain name can only have one root directory but things become a bit confusing when you add on domains.

When your ftp program opens your hosted space it first shows you a number of folders. These are actually termed as being "above" the root directory but we might imagine them as the branching of the roots under the ground. We are not meant to see them. They do have functions we can use but most people rarely do. Usually only programmers use them.

The public_html Directory

What is most commonly called the root directory on your server is a directory called public_html. It has other names on other servers, so if your root folder is called by a different name, I'd be grateful for clarification, if you'll name your host and say what they call this folder, by leaving a comment below.

The root directory is the first folder where the files of your main domain are. The index page inside this folder is the first or home page that is seen when someone types in a domain name or url such as

  • http://www.domainname.com.

By the way, a folder and a directory are exactly the same thing. Originally they were called directories and servers saw no reason to adopt the folder name that Microsoft introduced with Windows 95.

Sub Domains

Any folder inside this folder such as an images folder is a subdomain of your main domain. Each folder inside the root folder should have an index page made for it. If you do not put an index page in, the server will display the contents as an index. If you have files in the folder that you don't wish to be seen unless you give out the link, to protect them, make sure there is a blank index.html page in the folder.

To ftp something into the root directory, open the public_html directory. You should be able to see a placeholder index page. Select the files and upload them while this folder is open. If this is your first ftp you will answer yes when asked to overwrite index.html with your new websites index page. There can only be one index.html page per folder and it is always the first page that is served when the folder is addressed. It is called index because it often has all the links to the other pages on your site on it.

The url of a subdomain

A subdomain is a folder inside the root domain folder. It can be a website in its own right with a different CSS theme, its own site map, its own navigation - everything. A subdomain has two different ways to be reached. You can write the url to a subdomain as

  • http://www.subdomain.domainname.com
  • http://www.domainname.com/subdomain/

Any folder inside a subdomain folder is usually called a subfolder and is added to the end of the second url such as

  • http://www.domainnmae.com/subdomain/subfolder/

Add On Domain Names

Now comes the confusing part - Add on domains. When people started to understand more about how search engines work, they came to see that the domain name is one of the most important factors they can consider. If you type in the words of your domain name you will always come on the first page of any search engine that has indexed you for those words.

As we try and optimise our pages for good keywords, picking a phrase with a high search volume and securing it for your domain name is a good strategy.

This led to some people having many different domain names. Hosts started to offer a way for all these domain names to be managed under one account. They give you a space with a single main domain name and enable you to add on other domain names.

  • These add on domains are not separate domains with a true individual root directory as your main domain is. They are just an option to have a new domain name used as an added url address. The index page of an addon domain name will be reached with what appears to be a root directory url such as http://www.domainname.com. In some ways it is a root directory but in others it is not, it is a subdomain.

Installing to Add on domains

This url will actually lead to a folder inside your root domain, or a subdomain. On the front end of your site this is rarely a problem. A Subdomain is called by an addon domain name. No problem, just semantics. For installations, when urls and paths need to match this can be hard to get right.

If you use your main domain name to ftp to a folder any paths set by the installation are set as the main domain url. They will show as such in the address box in a browser. To get around this, hosts provide people with an ftp path name that tacks the addon domains folder name to the main domains with an @ like an email. You set this up when you addon the domain name to your account.

In theory this should solve all your problems. In practice, many installers simply are not programmed to handle this and they refuse to connect correctly, if at all. Sometimes you can add the folder name( /subdomainname/ with or without either slash, trial and error) on to the main domain name and solve the problem, but often you cannot.

If I had found a "best" way to help people solve this problem, I'd share it with you. Unfortunately each situation is often a matter of trial and error and often the only way is to ftp it using the main domain name and then ftp search for instances of the main domain name in each file and alter it to reflect the addon domain name.

If anyone has a better way I'd love you to hub it! I have wondered if uploading through Cpanel is a better way. Anyone want to comment?

http://www.htmlquick.com for HTML tutorials and reference
http://www.htmlquick.com for HTML tutorials and reference

Print   —   Rate it:  up  down  flag this hub

Comments

RSS for comments on this Hub

exinco profile image

exinco  says:
2 years ago

thanks for the hub, i must study what you wrote. i'm confusing before

nicheblogs profile image

nicheblogs  says:
2 years ago

exinco - have you worked it all out now? Just wondered how you are doing?

pardall  says:
10 months ago

yeah, your little description here really made it clear to me now, I was puzzled by this error, of subdomain for weeks, I even left this site alone for a while where I created a sub-domain so I woldn´t go back and erasit all over again, and you know sometimes how much work you put it in there w/databases, changes, etc.

But thanks to you it really made it clear finally. many thanks,

Come visit us, at w1.dpgraphics.com.br

pardall.

Domain Resource  says:
9 months ago

It can get really complicated, especially now with all the changes with canonical urls?? But it is all important for seo so you have to get your around it all.

nicheblogs profile image

nicheblogs  says:
9 months ago

@pardell : Thanks, glad I helped you understand, it took me a long time to "get" the difference but once you do it makes everything else, especially installing new things, that much easier. Cool Joomla site by the way, I like using Joomla.

@domain resource : You're right . I should write an additional paragraph on the authority or canonical url. It is an important issue for seo and relatively easy to fix.

Meantime here are two good articles on the issue of canonical urls at the following links

http://www.mattcutts.com/blog/seo-advice-url-canon

http://www.socialpatterns.com/search-engine-market

Thanks for the comments

Julie

Submit a Comment

Members and Guests

Sign in or sign up and post using a hubpages account.


optional


  • No HTML is allowed in comments, but URLs will be hyperlinked
  • Comments are not for promoting your hubs or other sites

How to Addon a Domain Name

working