Deprecated: Function create_function() is deprecated in /home2/blogwebhostingbu/public_html/wp-content/plugins/facebook-like-box-responsive/facebook-like-box.php on line 29
Sub-domains and redirects simplify web access - WebHostingBuzz US Blog
Notice: Undefined variable: defaults in /home2/blogwebhostingbu/public_html/wp-content/plugins/fatpanda-facebook-comments/plugin.php on line 366
 

Sub-domains and redirects simplify web access

Posted on 07 Jun 2011 by Alan Burns

Sub-domains are useful. When you have your own domain name and a hosting account, you can create sub-domains.

Domain extensions such as .com and .ca are called top-level domains (TLDs). A second-level domain is a domain that is directly below a top-level domain, such as webhostingbuzz.com. That’s what we usually think of as a domain name which we can register. The next level down would be a third-level domain, also called a sub-domain, such as sales.domain.com or www.domain.com.. In fact, there can be multiple levels of sub-domain.

cPanel makes it easy to create sub-domains, as it’s done through a web-based interface and all the hard work is done automatically. By default, a cPanel sub-domain of dog.domain.com would have its URL resolve to domain.com/dog, but you can change that using a redirect. Combining a sub-domain with a redirect makes it possible to have short, elegant looking URLs that resolve to deeply nested paths.

For example, to more easily access each of the cPanel webmail clients via SSL, I made three sub-domains each redirected to an https URL:

  • horde.domain.com redirects to https://domain.com:2096/horde/
  • round.domain.com redirects to https://domain.com:2096/3rdparty/roundcube/
  • squirrel.domain.com redirects to https://domain.com:2096/3rdparty/squirrelmail/

To create a redirected sub-domain in cPanel:

  1. Click Subdomains.
  2. Click Create a Subdomain.
  3. Enter the desired sub-domain name.
  4. Click Create.
  5. When you see the message indicating that the sub-domain was created, click Go Back to return to the Subdomains screen.
  6. Under the Modify a Subdomain section, click Manage Redirection.
  7. Enter the path to which you want the sub-domain to resolve, and click Save.
  8. Enter the new sub-domain in your browser, e.g. .sub.domain.com, to see it work.

When working on early frameworks for a client web site, they might be accessed at a nested folder such as domain.com/clients/workshop/empire-surfboards/master.php. I create a sub-domain redirected to that URL. It’s far easier for me to remember empire.domain.com, and easier for my client.

When travelling, I often upload digital maps, itineraries and other useful documents to my web server. These serve as accessible backups for me, in case I lose the paper files I’m carrying, and family can also access these. Again, to simplify access I create a redirected sub-domain such as france.domain.com.

Once you realize how convenient redirected sub-domains can be, and how easy they are to create, I’m sure you’ll think of plenty of uses.

WebHostingBuzz Logo

© WebHostingBuzz USA LLC 2002 - 2024
WebHostingBuzz is a Registered Trademark.
All Rights Reserved.
WebHostingBuzz USA LLC, 850 Southbridge Street, Auburn, MA 01501, USA

1 (800) 252-1887

Payment Logos
  • Webmoney Verified
  • Webmoney Accepted

Sign up for our Newsletter

Scroll to Top