If you have to move a website from one domain to another, it will mean that all the links pointing to your old site would now be lost and would generate the dreaded 404 error when visitors came in via old search engine listing or links.
The best way to preserve your links, and have visitors end up on their required page is to setup a redirect from the old domain to the new one.
In this example, we are going to assume that we use to have a domain called OLDSITE.COM and for some reason we have to move everything across to NEWSITE.COM
The first up, dont kill the hosting for the old site but leave it operating for some time. This will then allow us to redirect visitors from the old site to the new site.
A 301 redirect simply tells search engines that visit your site that the old URL has now permanently changed to another URL. Once the search engines find the 301 redirect they will start to convert all the old links in their index across to the new location.
This will take some time and on site sites, this may take months to have the search engines convert all the old links across to the new locations.
An .htaccess file is nothing more than a...