Subdomain hosting - What are dns subdomains?

A subdomain is anything that appears before your master domain in the URL, and is based on dns. It is technically a third level domain name, and requires a change to your zone file.

Subdomain hosting does not require a separate ip address, although it can, and does not need the www in front of the dns subdomain. It takes the form of jane.domainname.com. As a rule; your zone file lives wherever your website is hosted, which is your dns authority.

It is important to note, you could have a custom dns setup - for example:

You host with the John Doe hosting company. However, your dns is handled by someone else, maybe your isp, lets say. This can be extremely confusing, so be prepared. To get started; contact your web host and they should be able to point you in the right direction, and can tell you what steps you need to take, and can tell you who your dns authority is.

Why would you use subdomain hosting?

Depending on how your webhost is setup there are several different ways subdomain hosting setup is handled. These are only a couple, and apply to Unix web hosting with an Apache webserver:

Wildcard dns can be used, a subdomain setup with no further action - except for the creation of a folder and an htaccess text file on the webmasters part. Multiple subdomains (or machine names) - can be set up this way with no assistance from system admins, all you need to do is create a folder, and an htaccess file with a rewrite rule. The dns will then resolve the subdomain. A subdomain can be pointed off the host server as well, to another ip address entirely.

This is written in your zone file like so:

* IN A 123.123.123.123

Or; you can create a subdomain; it's written in the dns zonefile; and you can use either .htaccess or httpd.conf to redirect to the folder that you have created for the subdomain. (Windows uses host headers, and usually must be configured by a system admin.) This is written in your zone file like so:

dick IN A 123.123.123.123
or
jane IN A 213.213.213.213
(if you want the subdomain pointing to another server.)

The .htaccess file you would create for either of the above cases will look like this:

RewriteEngine On
Options +FollowSymlinks
RewriteBase /
Rewrite Rule for jane.domainname.com
RewriteCond %{HTTP_HOST} jane.domainname.com$
RewriteCond %{REQUEST_URI} !jane/
RewriteRule ^(.*)$ jane/$1

This tells anyone that is going to http://jane.domainname.com to go to the folder jane on domainname.com. This file is named .htaccess (it is a "hidden" file) and is then uploaded to your root directory.

You can reach the subdomain either by http://domainname.com/subdomain/ or http://subdomain.domainname.com.

There is a third way; if you host with us; is simply to setup the domain in your control panel, where the process is automated. All you need to do is create the folder, no need for an .htaccess file. You can find instructions on Adding a subdomain here.

Hosting plans

Policies

Domain Transfer Information

Web master Resource Center

Web hosting TOS

Contact

Subdomain Index

Site Map

Order | About | Privacy Policy | Shopping Cart Programs | FTP | Email | DNS | Fantastico hosting
Affordable web hosting services - Reliable web site hosting service