1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

How DNS system works? (custom A record, causing reliable redirection?)

Discussion in 'Site & Server Administration' started by postcd, Oct 10, 2019.

  1. #1
    Hello,

    my domain is using nameservers of the hosting provider 1, i can not change my domain's nameservers now, but i can modify this provider 1 DNS A records to point to a new hosting provider IP. I am wondering if i can use this A record IP change to reliably redirect my visitors to new hosting provider?

    When i set there an IP of different hosting provider 2 - the IP that is shown to me in hosting account as a shared IP for my hosting account on provider 2 / or the IP shown as the IP on which is hosted my other domain within same hosting account in provider 2 server... will this "redirection" work?

    Here i write it in different words on how the DNS system may work (i need your kind review - if you have no time, general aswers to previous questions is also welcome):

    1. site visitor asks for the IP where domain.com is hosted. He ask the DNS servers set in his network interface configuration or in his router (in case he has DHCP). Then these servers discover (from the domain registar?) or from other DNS servers that IPs that belongs to a nameservers the domain is using (nameservers of the hosting provider 1)
    ->
    2. visitor now connect directly that IPs which may be a dedicated DNS server or a hosting server itself - managed by hosting provider 1
    ->
    3. DNS system on the hosting provider 1 server checks the DNS zone file of my domain.com and sees that A records for the domain.com and *.domain.com points to some external IP (provider 2)
    ->
    4. provider 1 server says my web browser that he need to use this new IP, so it connects again to this new IP and even the domain is not pointed to this IP (is using nameservers and the IPs of the provider 1) it serve me a website.
    ?
     
    postcd, Oct 10, 2019 IP
  2. postcd

    postcd Well-Known Member

    Messages:
    1,037
    Likes Received:
    9
    Best Answers:
    1
    Trophy Points:
    190
    #2
    Yes, changing A record for the domain and www. subdomain on provider 1 was enough to "redirect" web traffic to provider 2.

    First i changed TTL of the DNS A records and a MX record to 300 (5 minutes) and after like 30 minutes (was previous TTL value) i changed the IP value. The change was live in really minutes, loading the site from new hosting.

    Still i am interested to read your technical insight/comments about what i written earlier. Thank you
     
    postcd, Oct 11, 2019 IP
  3. HostDoc

    HostDoc Peon

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    1
    #3
    Wait. What?
    Why can't you change the nameserver? That is extremely odd if you have been locked into a nameserver.

    Your typing is hard to understand so I will keep this short:
    When a user types your domain name, a DNS lookup is carried out which will point to your nameservers.
    Your nameservers then give the A record for the IP translation of your domain and forwards traffic to that IP.
    The server which houses the IP will have child DNS settings and a vhost. The child DNS should report the same DNS settings as the parent where the nameservers are.

    So yes, A records will work. So will AAAA and CNAME.
     
    HostDoc, Nov 19, 2019 IP