+ Reply to Thread
Results 1 to 4 of 4

Thread: [Server setup]: CName and A record handling

  1. #1
    bhupendra2895's Avatar
    bhupendra2895 is offline x10 Elder bhupendra2895 is an unknown quantity at this point
    Join Date
    Jun 2010
    Location
    India
    Posts
    554

    [Server setup]: CName and A record handling

    Hi,

    I have a site having address example.com and it has a very nice application at /lookup/.
    So I created a sub-domain having address lookup.example.com pointed at /lookup/.

    Now one of my partner site approached me and they want to use my application at the address lookup.domain.com .They didn't want the source code.So I helped them by adding CNAME record like

    l
    ookup.domain.com => lookup.example.com

    But when I open lookup.domain.com, it takes me to the default page of Shared hosting server.

    Is this thing don't work in shared IP/Hosting environment & it will only work if I have dedicated IP?
    Actually the main question is, how CName works?

    Thanks,

  2. #2
    aakbar9372 is offline x10Hosting Member aakbar9372 is an unknown quantity at this point
    Join Date
    Jun 2010
    Posts
    6

    Re: [Server setup]: CName and A record handling

    I think, If you are using cPanel you should add the new domain and subdomain first. then point your domain to the IP via A record or CNAME.

    CNAME is duplicating the target's hostname/domain IP record. CMIIW

  3. #3
    misson is offline x10 Spammer misson is a jewel in the rough
    Join Date
    Mar 2008
    Location
    Libertatia
    Posts
    2,506

    Re: [Server setup]: CName and A record handling

    Quote Originally Posted by bhupendra2895 View Post
    Actually the main question is, how CName works?
    A CNAME record is a canonical hostname. When the browser goes to resolve the hostname "lookup.domain.com", it gets a response saying that "lookup.example.com" is the canonical name. The browser uses the canonical hostname rather than the original to get an IP address (often, the DNS response will also include this address to cut down on network traffic), then creates an HTTP connection to that address. It will send a "Host" HTTP header set to the original hostname when requesting a resource. A shared hosting server uses the "Host:" header to figure out which site to serve. The web server thus needs a ServerAlias configured so that "lookup.domain.com" will be recognized as an alias of "lookup.example.com". Creating a parked domain in cPanel should create the server alias.
    Last edited by misson; 01-08-2011 at 04:17 PM.
    Be sure to read all pages linked in this post; they have further information that should prove useful. When asking for help, make sure you follow Eric Raymond's and Jon Skeet's guidelines for prompt, accurate responses. Please answer any questions I ask; they're not rhetorical (probably). Any posted code is intended as illustrative example, rather than a solution to your problem to be copied without alteration. Study it to learn how to write your own solution.
    Misson, not Mission.

  4. #4
    bhupendra2895's Avatar
    bhupendra2895 is offline x10 Elder bhupendra2895 is an unknown quantity at this point
    Join Date
    Jun 2010
    Location
    India
    Posts
    554

    Re: [Server setup]: CName and A record handling

    Thanks Misson, I resolved this problem by creating a add-on domain that points at the directory where lookup.example.com also points to.Parked domain in my shared hosting service can only be parked to document root not on any other directory/sub-domain , so I need to use add-on domain.
    Last edited by bhupendra2895; 01-11-2011 at 01:21 AM.

+ Reply to Thread

Similar Threads

  1. A Record and CNAME Record Questions (How to point to x10Hosting)
    By patriotseminar72 in forum Free Hosting
    Replies: 7
    Last Post: 08-27-2010, 10:35 PM
  2. Want to add cname record. Please help.
    By mani_1993 in forum Free Hosting
    Replies: 2
    Last Post: 01-21-2010, 02:47 PM
  3. CNAME Record handling with subdomains
    By Equiflux in forum Free Hosting
    Replies: 0
    Last Post: 06-12-2006, 09:31 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