What are the security tips for website migration on the virtual host? Many websites need to change the virtual space in the process of running websites. What should be paid attention to when changing the virtual host space? No matter what kind of website space you use, you may encounter the situation of replacing a new host. Changing the space is relatively troublesome, and there are many problems that need our attention, among which website security must be paid attention to.
1. Security check before migrating a new host
In general, before migrating a new host, we should first test whether the IP address of the new virtual host is secure, and check whether its IP address is included in the SPAM list, whether it is blocked by major search engines, and whether there are other illegal websites on the same IP address through Telecom, Netcom Whether multiple different lines such as double line can normally access the IP address of the virtual host, do not migrate website data to the above problematic virtual host IP.
2. Preliminary plan before website migration
First of all, we need to develop a detailed and step-by-step website migration plan. One Network will store the original website host and website content for at least half a month in its classified directory, because each major search engine will have a cache so that each major search engine can still access the website content with the original IP address, If you accidentally delete the content of the original website, many pages will not exist, which will bring unnecessary losses to the search engine.
3. Back up the website
The most important thing is to back up the database and upload the folder. Remember to back up. If you don't know the aggregated directory structure of the website program, you can spend more time to back up the whole site. The backup I usually do is to download these important aggregated directories to my computer. While backing up the website, you can turn off various services of the website, such as comments and messages.
4. Modification of domain name resolution
Try to avoid migrating websites by modifying the DNS (DomainNameServer) server address. It is better to use the time switch of 1-2 hours at most when modifying the A record. If it takes 24-48 hours for the DNS modification to take effect nationwide, it is more reliable to modify the A record intermittently.
5. Please keep the original website for at least 7 days
The website migration should be carried out several days in advance. The original website content should be saved for at least 7 days without updating the site to ensure that the search engine can still access the content using the original IP address. The reason is that many search engines will cache DNS. If you delete all the original website data at that time, a large number of 404 error pages may appear, After the DNS updates cached by the search engine, such as the micro page website directory, you can delete all the data on the original virtual host.
The migration of the virtual host website is just a few steps, and it is now complete. Finally, you must remember: ensure that two identical websites can appear in two different domains at the same time and visit normally, and then the domain name is resolved to the new site, and the old site is retained for a period of time.
6. Real implementation of website data migration
Keep the original website unchanged. Copy the content, database, server settings, etc. of the original website to the new virtual host first. Test whether the website on the new virtual host works normally by modifying the local HOSTS file to switch the IP address. If the new website If everything above is normal, the domain name can be resolved to the new IP address of the virtual host.