Moving sites 301 redirect defaulting to first site?


i’m moving my sites to a different server. I moved my 1st site and everything went fine. I moved the 2nd site and it would 301 redirect to the 1st site until i completely move the database and files then it works.

I go to move the 3rd site and again it automatically 301 redirects to 1st site i moved.

is there a way to stop this behavior?

thanks in advance!


How do you move your sites? What t is the procedure?


i create the site on the new server, rsync the files over, then export the database to the new server. Import the database.


What about your DNS settings? Are you pointing to a new server/nameservers?


Yes, I change the IP to point to the new server IP before I start the process.


I don’t see any issues in your actions, it should be working fine. I did it many times the same way you did and never had any issues similar to what you describe.


If your using the same domain name then you should not be using a 301. Update your DNS A host and keep the old sites static.

Idealy if your moving all three you should lock the site so nothing can be changed. Then rsync and COPY database. Make sure the new server is ready to handle requests and then change the DNS records. Having the old site locked prevents and changes from being lost (Important for ecommerce and forums) while DNS records are updated. A user that is still pulling the old site should see a message stating the site is temporarly locked. until their DNS updates and they get the new site. If the site has no user interaction the locking is not necessary.