0

I'm curious if there are any possible way to move a working project from one hosting provider to another one (shared hosting, Linux+Apache+MySQL) with the same domain name very fast? The simplest way is to stop the project and let a new hosting provider to move the domain name, get the same, but new hosting plan and set up everything from scratch.

Is there any better way (like to register the second ip address or something like that, so the old name redirects to a new address, so users will not fill any changes during the time of moving)? Any possible ways?

P.S. Users know the site not by ip, but by the domain name.

2
  • the question is off topic here. It is not related to programming (but to system administration).
    – Basile Starynkevitch
    Dec 6, 2011 at 8:28
  • I'm sorry. Where is the best way to ask this question at stackoverflow? I don't see any other places...
    – Haradzieniec
    Dec 6, 2011 at 8:36

2 Answers 2

2

Assuming you have control of your individual DNS records:

If you do not have a database or files that are being modified by visitors to the site (new users created etc):

  1. set up new hosting with new provider (just purchase hosting only, not hosting plus domain - make sure the hosting is configured to use your main domain name though)
  2. copy the website + database over to the new hosting and change any settings that need changing for the new server (the website might be using absolute paths somewhere...)
  3. test the site; often your hosting provider will give you a 'temporary' URL (ie, URL alternative to the main domain name), else you can modify the hosts file on your computer to point the domain name to the new hosting IP
  4. when tested ok, modify DNS to point website to new hosting server (if you want to transfer the domain name to the new provider - which is not necessary btw - then change the name servers at this point to the new providers name servers)
  5. if you do want to transfer the domain, kick it off a few days later. the name servers should already be pointing at the new hosting providers servers There should be no downtime with this method if you do it properly.

If you do have database/files that need to be kept current:

  1. do points 1-3 as above
  2. as ampere has said, set up a subdomain on your new host, pointing into the same folder as the normal www (say, new.mydomain.com)
  3. add the subdomain to your DNS
  4. wait a few days
  5. put a temporary holding page up on your old host
  6. quickly update the database / any changed files on your new host with whatever has changed since point 1
  7. on the old host, replace the holding page with a redirection to new.mydomain.com (which will have already propagated, pointing to the new server)
  8. wait a few days
  9. change your name servers to the new host (by this time you can get rid of the new subdomain as everyone should be using the www to come to the new host, or you can keep it and set up a 301 redirection to www if you're worried about any links/SEO issues with the temporary subdomain)
  10. transfer the domain to the new host

The downtime involved here is however long it takes you to do points 5-7.


Sadly, both take up a fair bit of time, and what you are able to do depends on what services your hosting provider gives you. Some will not give you individual DNS control, some will not let you direct a subdomain into the main website document root etc. If you have flexible hosting providers + use a separate domain registrar (so you don't need to transfer the domain as well) then you can do a lot more to mitigate transfer downtime.

1

Just Create a subdomain with the same files which are in the root. In default the nameservers for the subdomain will be automatically created.

Now get a hosting account for the domain and update the new nameservers to your domain[The subdomain should have the old nameservers].

The nameservers will normally take some time to propagate. Till then you can redirect your customers to your subdomain which has the same features as like your main domain.

So once after the nameserver propagation you can use the new hosting account, i mean your main domain.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .