Hey folks. This is a tutorial to tell how to create subdomains over your domains. Such as "subdomain.yourdomain.com". Hope this helps.
First Level Subdomains
Everybody who has a domain name also has a "www" subdomain (In "www.frihost.com", the "www" part is the subdomain). The www subdomain is created by, and serves files from, your /htdocs/www directory on the filesystem.
Now we will try to learn how to add more subdomains. All you need to do is to create a new subdirectory in the /htdocs directory.
For example, if you had the domain name frihost.com and you now wanted a subdomain for "Tutorials", then you would need to create the directory /htdocs/tutorials and upload the files in this new directory that you wanted to see at http://tutorials.frihost.com
Second Level Subdomains
To create second level subdomains like www.tutorials.frihost.com ("www" is the second level subdomain and "tutorials" is the first level subdomain in this example) then you can do one of these:
*The first way; if you have made an /htdocs/tutorials directory so that you have http://tutorials.frihost.com then you can make http://www.tutorials.frihost.com by getting a shell prompt and creating a symlink like this:
cd /htdocs
ln -s tutorials www.tutorials
Now http://www.tutorials.frihost.com will bring you to the same place as http://tutorials.frihost.com and all the files for both of these URLs are uploaded in the /htdocs/tutorials directory.
**The second and alternative way; you may want your second level subdomain to lead to a separate area of your website instead of being symlinked together with the first level subdomain. For example you may want http://photoshop.tutorials.frihost.com (where "photoshop" is the second level subdomain) to go to a section of your website dedicated to Photoshop tutorials only, and have http://tutorials.frihost.com just lead to a different section of your site about all the tutorials in general. To setup the second level subdomain this way, you have to make a separate directory altogether for it, like this:
cd /htdocs
mkdir photoshop.tutorials
The "photoshop.tutorials" subdirectory is created right alongside all the other subdomain subdirectories, including the "tutorials" subdirectory, if you made one. Then you upload files related to Photoshop into the /htdocs/photoshop.tutorials subdirectory, and view them in a browser at http://photoshop.tutorials.frihost.com
In addition, if you need or want to delete a subdomain symlink made with the "ln -s ..."
rm -f /htdocs/www.tutorials
Not:!!!Make sure the directory name you create is all lower-case, with no
spaces. CAPS or Mixed-Case will not work. And all you can use is the letters and numbers. I am not sure if hyphens are allowed. Don't use another character like for ex. underscore. Don't forget this!
First Level Subdomains
Everybody who has a domain name also has a "www" subdomain (In "www.frihost.com", the "www" part is the subdomain). The www subdomain is created by, and serves files from, your /htdocs/www directory on the filesystem.
Now we will try to learn how to add more subdomains. All you need to do is to create a new subdirectory in the /htdocs directory.
For example, if you had the domain name frihost.com and you now wanted a subdomain for "Tutorials", then you would need to create the directory /htdocs/tutorials and upload the files in this new directory that you wanted to see at http://tutorials.frihost.com
Second Level Subdomains
To create second level subdomains like www.tutorials.frihost.com ("www" is the second level subdomain and "tutorials" is the first level subdomain in this example) then you can do one of these:
*The first way; if you have made an /htdocs/tutorials directory so that you have http://tutorials.frihost.com then you can make http://www.tutorials.frihost.com by getting a shell prompt and creating a symlink like this:
cd /htdocs
ln -s tutorials www.tutorials
Now http://www.tutorials.frihost.com will bring you to the same place as http://tutorials.frihost.com and all the files for both of these URLs are uploaded in the /htdocs/tutorials directory.
**The second and alternative way; you may want your second level subdomain to lead to a separate area of your website instead of being symlinked together with the first level subdomain. For example you may want http://photoshop.tutorials.frihost.com (where "photoshop" is the second level subdomain) to go to a section of your website dedicated to Photoshop tutorials only, and have http://tutorials.frihost.com just lead to a different section of your site about all the tutorials in general. To setup the second level subdomain this way, you have to make a separate directory altogether for it, like this:
cd /htdocs
mkdir photoshop.tutorials
The "photoshop.tutorials" subdirectory is created right alongside all the other subdomain subdirectories, including the "tutorials" subdirectory, if you made one. Then you upload files related to Photoshop into the /htdocs/photoshop.tutorials subdirectory, and view them in a browser at http://photoshop.tutorials.frihost.com
In addition, if you need or want to delete a subdomain symlink made with the "ln -s ..."
rm -f /htdocs/www.tutorials
Not:!!!Make sure the directory name you create is all lower-case, with no
spaces. CAPS or Mixed-Case will not work. And all you can use is the letters and numbers. I am not sure if hyphens are allowed. Don't use another character like for ex. underscore. Don't forget this!
