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 to change hosts without DNS Propagation Downtime?

Discussion in 'Web Hosting' started by flamingo2009, Jun 21, 2018.

  1. #1
    I am planning to shift our e-commerce store to a different hosting provider. What's the best way to change hosts without any DNS Propagation Downtime?
     
    flamingo2009, Jun 21, 2018 IP
  2. qwikad.com

    qwikad.com Illustrious Member Affiliate Manager

    Messages:
    7,198
    Likes Received:
    1,672
    Best Answers:
    29
    Trophy Points:
    475
    #2
    Just keep the site live on the old provider until the domain name is fully propagated on the new provider. Once it is fully propagated (2-3 days) you can then cancel the old one.
     
    qwikad.com, Jun 21, 2018 IP
  3. flamingo2009

    flamingo2009 Active Member

    Messages:
    38
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    91
    #3
    Yes, that would have been the most obvious thing but we cannot afford to keep the site on two different locations since we are an ecommerce store and receive orders every few minutes. We cannot have duplicate order numbers on both sites. We were wondering if we add the nameservers of the new site along with the existing nameserver records and delete the old records after 24 hrs by which time the DNS propagation would have happened. Will that work?
     
    flamingo2009, Jun 22, 2018 IP
  4. qwikad.com

    qwikad.com Illustrious Member Affiliate Manager

    Messages:
    7,198
    Likes Received:
    1,672
    Best Answers:
    29
    Trophy Points:
    475
    #4
    I don't know if there's an easy way to switch between two providers. I did it twice myself (both times databases, ongoing sales, etc. were involved). The first time I did it I contacted my hosting provider and they told me that keeping the site up on both providers was the only way I could do that. It was messy to be honest as I had to manually update the DB on my new provider from time to time (the site was switching back and forth between the providers for at least 48 hours). Maybe you will find a way to do it differently, please, feel free to share it here what worked for you.
     
    qwikad.com, Jun 22, 2018 IP
  5. dts-net

    dts-net Well-Known Member

    Messages:
    71
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    175
    #5
    recommend using a third party provider like cloudflare as well prevents down time
     
    dts-net, Jun 28, 2018 IP
  6. Ant-Lion

    Ant-Lion Well-Known Member

    Messages:
    164
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    120
    #6
    If the new host allows remote Database/MySQL access you may be able to adjust the database settings on the site with the old host to make it use the database on the new host. I don't know what Ecommerce software you are using so I am not sure how well it would work but it is an idea.
     
    Ant-Lion, Jul 19, 2018 IP
    qwikad.com likes this.
  7. UnderHost_MSA

    UnderHost_MSA Notable Member

    Messages:
    1,195
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    200
    #7
    While the should be no propagation issue worldwide your ISP or cache could cause issue to you, CloudFlare could be a good alternative while moving setup your CloudFlare account then change IP in CloudFlare once ready.
     
    UnderHost_MSA, Jul 31, 2018 IP
  8. RHS-Chris

    RHS-Chris Well-Known Member

    Messages:
    1,007
    Likes Received:
    35
    Best Answers:
    10
    Trophy Points:
    150
    #8
    Hello there,

    My suggestions:
    • Take your TTL (time to live) records on your current (old) host to a very low value (suggest 1 hour), then wait for a couple of days to allow full propagation.
    • Close the site down to new orders on your current (old) host, then migrate to the new host.
    • Change the TTL records on your new host to previous values.
    • Change the "A" record on your current (old) host to the new IP of your new host.
    Doing the above will minimize the downtime, as mentioned though some ISP's take longer than others to update, so changing the "A" record on your current (old) host to point to the IP of your new host will help.

    Regards,
    Chris
     
    RHS-Chris, Jul 31, 2018 IP
  9. Komputerking

    Komputerking Greenhorn

    Messages:
    33
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    8
    #9
    My recommendation would be to enable remote mysql on both hosting providers. If you are using cPanel, then there should be a button for it on the list. Otherwise, create a new mysql user with the same login/password and with the original hosts source ip.
    If you have ssh access, verify that you can connect to the new server with the login/password/host version. It can be done via the following
    mysql -u[username] -p -h[ip address of new] [database]
    If you are able to connect remotely, then setup a time when there is little to no traffic. Transfer all of the hosts files using rsync from the source server to the destination server. Setup the database config file on the new server correctly.
    Set the source server into maintenance mode to prevent an order during the transfer (just in case)
    Export the source database, transfer it to the new server, and import the database.
    While the database is importing, change the config file on the source server and set the database host to the new server.
    Once the database import is complete, take the site out of maintenance mode.
    Verify that everything is working when you hit the site. If all is well (albeit a bit slower) then update DNS to point to the new server.

    If you have SSH access on both servers, you could technically shut down mysql on both servers, and perform an rsync from source -> destination and that should reduce downtime even more, but if you are not familiar with this process, I do not recommend it.

    With this setup, you should be able to bring the site up on the new server, and downtime will be minimal, and if people hit the old server while DNS propogates, your database will still stay synced without issues.
     
    Komputerking, Jul 31, 2018 IP