Can this be done with DNS?

Discussion in 'Site & Server Administration' started by jlocke, Jan 18, 2007.

  1. #1
    I want to take one section of my domain and move it to another box. The only way I thought you could do this was to create a separate IP and DNS entry.

    For example: (this is what I normally do but it sucks having to use ww2)

    www.sitehere.com 10.1.1.1 A record
    ww2.sitehere.com 10.1.1.2 A record

    Is there anyway it can be done through DNS where IP is directed as follows? For example:

    www.sitehere.com 10.1.1.1
    www.sitehere.com/section/ 10.1.1.2

    thx
     
    jlocke, Jan 18, 2007 IP
  2. tanfwc

    tanfwc Peon

    Messages:
    579
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #2
    As far as I know, only subdomain can have A records. What you want should not be able to do it. Others may want to advice on this :D
     
    tanfwc, Jan 18, 2007 IP
  3. jlocke

    jlocke Peon

    Messages:
    20
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Been struggling with that for years for different sites so always used an A record and did a ww2 or ww3 or a redirect from the original page or php includes. All not ideal.

    So if DNS cannot do it I am assuming that large sites have some sort of other method of doing this without the methods I describe above. Anyone?
     
    jlocke, Jan 18, 2007 IP
  4. tanfwc

    tanfwc Peon

    Messages:
    579
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #4
    large sites are using true load balancing hardware ... :D
     
    tanfwc, Jan 18, 2007 IP
  5. fsmedia

    fsmedia Prominent Member

    Messages:
    5,163
    Likes Received:
    262
    Best Answers:
    0
    Trophy Points:
    390
    #5
    only subdomains can use separate IP addresses, sections of a site cannot.
     
    fsmedia, Jan 18, 2007 IP
  6. ThomasNederman

    ThomasNederman Peon

    Messages:
    112
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #6
    The best way of doing the above is to have round robin DNS, with several DNS pointers for the same site (same site on different boxes) like this :

    host -t A www.microsoft.com
    www.microsoft.com[/url] is an alias for toggle.www.ms.akadns.net.
    toggle.www.ms.akadns.net is an alias for g.www.ms.akadns.net.
    g.www.ms.akadns.net[/url] is an alias for lb1.www.ms.akadns.net. lb1.www.ms.akadns.net has address 207.46.18.30
    lb1.www.ms.akadns.net[/url] has address 207.46.19.30
    lb1.www.ms.akadns.net[/url] has address 207.46.19.60
    lb1.www.ms.akadns.net[/url] has address 207.46.20.30
    lb1.www.ms.akadns.net[/url] has address 207.46.198.60
    lb1.www.ms.akadns.net[/url] has address 207.46.199.30
    lb1.www.ms.akadns.net[/url] has address 207.46.199.60
    lb1.www.ms.akadns.net[/url] has address 207.46.225.60
    www.microsoft.com[/url] is an alias for toggle.www.ms.akadns.net.
    toggle.www.ms.akadns.net[/url] is an alias for g.www.ms.akadns.net.
    g.www.ms.akadns.net[/url] is an alias for lb1.www.ms.akadns.net.
    www.microsoft.com[/url] is an alias for toggle.www.ms.akadns.net.
    toggle.www.ms.akadns.net[/url] is an alias for g.www.ms.akadns.net.
    g.www.ms.akadns.net is an alias for lb1.www.ms.akadns.net.


    Depending on what DNS server you are using, this can be done by adding several record pointing to the same host.

    Bellow is the lines in Bind DNS server on how to add 2 host for the same record

    www IN A xxx.xxx.xx.xxx
    www IN A xxx.xxx.xx.xxx

    Alternativly you can use mod_proxy with proxypass /Section/ www2.yourdomain.com
     
    ThomasNederman, Jan 19, 2007 IP