• Visitors can check out the Forum FAQ by clicking this link. You have to register before you can post: click the REGISTER link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. View our Forum Privacy Policy.
  • Want to receive the latest contracting news and advice straight to your inbox? Sign up to the ContractorUK newsletter here. Every sign up will also be entered into a draw to WIN £100 Amazon vouchers!

Please explain CNAME to me

Collapse
X
  •  
  • Filter
  • Time
  • Show
Clear All
new posts

    Please explain CNAME to me

    Imagine I have a website at www .mydomain.com

    If I add a DNS CNAME record which says
    banana .mydomain.com = www .mydomain.com

    I wonder why typing in banana .mydomain.com doesn't show the website?

    I get this:
    The requested URL / was not found on this server.

    Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

    #2
    host headers, the website needs to be listening for the URL that the browser is accessing it from.

    What web server are you using (IIS/Apache etc.)?

    Comment


      #3
      CNAME record - Wikipedia, the free encyclopedia

      Have a read of the "details" section.

      G

      Comment


        #4
        Originally posted by kirk View Post
        host headers, the website needs to be listening for the URL that the browser is accessing it from.

        What web server are you using (IIS/Apache etc.)?
        Tell me more .. (please!)

        It's Apache. Hosted. So I don't have access to the logs or httpd.conf but I might be able to ask the hoster to add to httpd.conf ... do I need a VirtualHost entry too?

        TIA.

        Comment


          #5
          Apache isn't my forte but this may hep VirtualHost Examples - Apache HTTP Server Version 2.2

          Comment


            #6
            Maybe wait for DNS to propogate. Might be fairly quick nowadays tho...

            Comment


              #7
              Originally posted by stek View Post
              Maybe wait for DNS to propogate. Might be fairly quick nowadays tho...
              Thanks, but that isn't it.

              Comment


                #8
                I'd agree with Kirk, it will most likely already have a virtualhost directive pointing at www.mydomain.com. The problem is your browser is connecting to the server and asking for the page at banana.mydomain.com and the web server has no idea which of the virtual hosts that is.

                Ask them to add a serveralias for banana.mydomain.com to your current virtual host.

                Comment


                  #9
                  Are you sure you're pointing the CNAME correctly?
                  Check what www is pointing to and just setup banana the same.
                  Don't believe it, until you see it!

                  Comment


                    #10
                    Ping www.mydomain.com and note the IP. Then ping banana.mydomain.com - if it's the same IP then DNS is fine and, as above, you need to sort the Virtual Host config.

                    Comment

                    Working...
                    X