+ Reply to Thread
Page 1 of 2 12 LastLast
Results 1 to 10 of 15

Thread: What exactly is a subdomain?

  1. #1
    lydia09 is offline x10Hosting Member lydia09 is an unknown quantity at this point
    Join Date
    Dec 2009
    Posts
    62

    What exactly is a subdomain?

    Hi everyone,
    I was curious, can anyone explain to me what exactly a subdomain is? I did some research on it, and here's what I have so far:

    1. A subdomain is a specific section of a web site, accessed like: subdomain.domain.com
    2. A subdomain is served out of a folder in your web root.
    3. A subdomain can make users' browsing faster.
    4. A subdomain causes that particular area of your site to be indexed better by search engines.

    Now, I'm not fully sure if all this is right, but this is how I understand it at the moment.

    So... it seems to me, based on this, that you should be able to make a subdomain by creating any old folder in your web root, and then you can access it like: myFolder.mySite.com. Apparently, however, this isn't the case. This makes me very confused.

    Then, what exactly is it about subdomains that makes them so special, and able to behave the way they do? I'm not planning on making any, because x10hosting limits us to 3, but I'm just curious, for my own reference, how exactly do subdomains work? Can anyone explain this to me, please?

    Thanks,
    Lydia
    Last edited by lydia09; 01-10-2010 at 12:05 AM. Reason: Forgot something

  2. #2
    Smith6612's Avatar
    Smith6612 is offline <<< wants a Turkey Smith6612 has a spectacular aura about
    Join Date
    Dec 2007
    Location
    Exploded
    Posts
    6,467

    Re: What exactly is a subdomain?

    They work by allowing you to enter in an address to a folder on your website without having to go through the whole thing of knowing the full file path. For example, take x10hosting.com. x10hosting.com is the primary domain, where as forums.x10hosting.com is the subdomain. The forum software could however be installed at www.x10hosting.com/mainsite/forums, but the subdomain makes it much easier to remember and makes things look cleaner.

    That's the way I can put it.

    My signature likes cookies! Do you? :D

  3. #3
    Twinkie is offline Banned Twinkie is an unknown quantity at this point
    Join Date
    Sep 2007
    Location
    Ft. Lauderdale, Florida
    Posts
    1,389

    Re: What exactly is a subdomain?

    I believe he understands that, but wants to know the technical aspect of it. I don't know how Apache works...

  4. #4
    vishal's Avatar
    vishal is offline -::-X10 Guru-::- vishal has a brilliant futurevishal has a brilliant future
    Join Date
    Nov 2009
    Location
    INDIA
    Posts
    5,250

    Re: What exactly is a subdomain?

    A Apache config file looks like this ,we can also use server alias
    <VirtualHost aaa.bbb.ccc.ddd>
    ServerName www.domain.com
    ServerAdmin webmaster@domain.com
    DocumentRoot /path/to/your/document_root
    ServerAlias sub.domain.com
    </VirtualHost>
    Regards ~ Vishal
    Giving Reputation (at bottom of my post ) is the best way to encourage the person who helped you on forums.

  5. #5
    lydia09 is offline x10Hosting Member lydia09 is an unknown quantity at this point
    Join Date
    Dec 2009
    Posts
    62

    Re: What exactly is a subdomain?

    Thanks everybody,
    So, basically what I'm getting from this is that a subdomain is created by a virtual host of some kind, which means you can do something like this:

    <VirtualHost http://sub.mydomain.com>
    ServerName http://domain.com
    DocumentRoot /path/to/your/document_root
    ServerAlias sub.domain.com
    </VirtualHost>

    And then some magic happens behind the scenes to create a subdomain? Is that how it works? I tried temporarily creating a subdomain, just for kicks, but I didn't see an .htaccess file involved, so I have a feeling that means I'm missing something.

    Thanks,
    Lydia

  6. #6
    vishal's Avatar
    vishal is offline -::-X10 Guru-::- vishal has a brilliant futurevishal has a brilliant future
    Join Date
    Nov 2009
    Location
    INDIA
    Posts
    5,250

    Re: What exactly is a subdomain?

    if u r subdomain is working then fine dont bother about the .htacces
    Regards ~ Vishal
    Giving Reputation (at bottom of my post ) is the best way to encourage the person who helped you on forums.

  7. #7
    mcnigelmcgruff is offline x10Hosting Member mcnigelmcgruff is an unknown quantity at this point
    Join Date
    Jan 2008
    Posts
    17

    Re: What exactly is a subdomain?

    Subdomains are simply a way to sub-divide a domain name that you have control over. Originally, subdomains were simply different servers (i.e. www = primary webserver; mail = email server). Now that web protocols have advanced, subdomains can be used for many things. I think your confusion comes from the way that domains are used, so let's break it down:
    If you access a site using this path:
    http://books.read.us.thisdomain.com/funstuff/readmeone.html
    then you are providing your computer with a lot of information as to what to get and how to get it.
    -The "http://" piece tells the browser to use the http protocol
    -"books" represents the name of the server that the file resides on
    -"read" represents a subset of "us" which is a subset of "thisdomain" which is a subset of "com" which is a subset of the root of the DNS tree
    -"/funstuff/" is the directory under the root that the file resides in
    -"readmeone.html" represents the file (this file could be a web page) that you want to get

    Now this is the basic way it works; because things like DNS and virtual hosts and directories are very flexible, there can be many tricks that web hosts use:
    -"books" doesn't necessarily have to the be the name of the server. It could be anything else, this is entirely determined by DNS. For instance, where I work the real name of our email server is "midas", but to access it you use "mail"
    -"read" being a subset of "us" can be complicated, too. Some domains just use it with DNS to split the domain into subsections, others use it for delegation. For instance, when you get a free domain from x10hosting (whatever.x10hosting.com), the people that own x10hosting use DNS to give you control over the whatever section of their domain.
    -If you create a directory under your root, it will be shown after the DNS portion is finished. (i.e. "/funstuff/"). This can simply be managed by creating folders under your web root.

    Most of what is explained above is generic. It is simply the way the web works. However, because sites out there want things setup a certain way, admins use many tricks and advanced features to make it happen. Subdomains are primarily a DNS feature, so I would do some more research into the way DNS works before you make any changes to your account.

  8. #8
    espfutbol98's Avatar
    espfutbol98 is offline x10 Sophmore espfutbol98 is an unknown quantity at this point
    Join Date
    Apr 2009
    Location
    Zagreb... želim
    Posts
    200

    Re: What exactly is a subdomain?

    I think you also have to make a DNS MX record pointing the subdomain to the server IP as well. This can be done, for example, on godaddy.com under "total DNS control".
    Last edited by espfutbol98; 04-01-2010 at 12:06 AM.

  9. #9
    mcnigelmcgruff is offline x10Hosting Member mcnigelmcgruff is an unknown quantity at this point
    Join Date
    Jan 2008
    Posts
    17

    Re: What exactly is a subdomain?

    Quote Originally Posted by espfutbol98 View Post
    I think you also have to make a DNS MX record pointing the subdomain to the server IP as well. This can be done, for example, on godaddy.com under "total DNS control".
    DNS MX records only apply if you intend to receive email using that specific domain name. In the case of cPanel, they are usually generated automatically. But you are correct in the likely location for creating a subdomain (under a DNS management tool). Or in cPanel, if you are using x10.

  10. #10
    slacker3's Avatar
    slacker3 is offline x10 Sophmore slacker3 is an unknown quantity at this point
    Join Date
    Jul 2009
    Posts
    145

    Re: What exactly is a subdomain?

    Quote Originally Posted by lydia09 View Post
    Thanks everybody,
    So, basically what I'm getting from this is that a subdomain is created by a virtual host of some kind, which means you can do something like this:

    <VirtualHost http://sub.mydomain.com>
    ServerName http://domain.com
    DocumentRoot /path/to/your/document_root
    ServerAlias sub.domain.com
    </VirtualHost>

    And then some magic happens behind the scenes to create a subdomain? Is that how it works? I tried temporarily creating a subdomain, just for kicks, but I didn't see an .htaccess file involved, so I have a feeling that means I'm missing something.

    Thanks,
    Lydia
    you need an A or CNAME resource record in your DNS server
    for each subdomain you want to create

    (they could all point to the same IP/hostname - apache decides
    what to serve by the requested hostname)
    Last edited by slacker3; 04-03-2010 at 04:51 PM. Reason: ...

+ Reply to Thread
Page 1 of 2 12 LastLast

Similar Threads

  1. CPanel Subdomain issue
    By isaacl in forum Free Hosting
    Replies: 2
    Last Post: 07-06-2008, 04:17 PM
  2. Help I cant Make Subdomain!
    By aaaclans in forum Free Hosting
    Replies: 0
    Last Post: 06-28-2008, 08:39 PM
  3. How to change subdomain name?
    By lilpip in forum Free Hosting
    Replies: 1
    Last Post: 02-22-2008, 08:16 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers