Yesterday someone asked Lao Wei: Siteground has built a website with domain name A, and now there is a domain name B that also wants to point to this website. How should we operate?If it is a server, many people also know how to operate it. This is in the siteground virtual host, and the operation method is different.Lao Wei shared the whole operation process for friends in need.
It is an American host company, and is famous for providing virtual hosts that are easy to use, fast, convenient and high-speed.Many people in the domestic and foreign trade circles are using it, including foreign trade factories, trading companies, etc.One click deployment of SSL certificates, one click cache acceleration, one click cdn acceleration, one click move and other functions are all available.It is convenient for novices to use, and the speed of both domestic management websites and foreign customers visiting websites is good.
If you want to be a foreign trade website,Click me to openGo to siteground to register a new account and start your journey of building a foreign trade website.Lao Wei wrote a lot of articles for the establishment of the site ground as follows:
Foreign trade, B2C/C2C and other websites suggest registering domain names abroad.openNamesilo official website, enter and select in the search box, and then register. Remember to use the discount code to save money.Discount code clickCourse of domain name registration of foreign domain name provider Namesiloobtain. The 18th anniversary of SiteGround virtual host will greatly promote 25% discount on virtual host+free website moving service+3 months free site scanner Suggested choice of foreign trade websiteSiteGround virtual host。SiteGround virtual host is the host officially recommended by WordPress, which is a perfect match with WordPress.The WordPress website on the Siteground virtual host has excellent speed and stability, and has been highly evaluated on foreign test websites. About SiteGround:SiteGround Theme
2、 A domain name points to B domain name
Reason: The user has previously registered an old domain name. After a while, he thought that the domain name was not ideal. In addition, he has registered a new domain name that he would like to use for a long time.This old domain name also has traffic and weight, and Google has released many pages, which is a pity to throw away.Just want to point to the new domain name to keep the previous visits and customers.
Old Wei has never operated on this demand. Fortunately, the after-sales customer service work of the site ground is of a very high standard.Old Wei communicated with the customer service by means of online chat. While chatting, he followed the suggestions of the customer service and soon got it done.
There are three different departments in Siteground's online chat customer service: ordinary customer service, advanced technical support team, and financial department.For ordinary questions, choose ordinary customer service. If he doesn't understand the question, he will go to ask the senior technician, and then answer you.
Or you can directly ask the senior technical department and they will reply to you.
To make a long story short, Lao Wei learned the whole operation process as follows:
1. Modify NS record
The NS record of the old domain name should be changed to the NS record of the new domain name of your siteground.Or add A record of the old domain name to point to the IP address of the siteground virtual host.Lao Wei recommended to use the previous method of modifying NS records, which is quite thorough.
The option is DASHBOARD>>DOMAIN>>Parked Domains. Add the old domain name as shown in the figure below,Only add the main domain name, without filling in the www prefix。It doesn't matter if the novice doesn't understand. Follow the picture below。
3. Add SSL certificate to old domain name
In SECURITY>>SSL Manager, add the LetsEncrypt certificate to the old domain name.
3、 Is this done?
1. Customer service has something to say
At this time, the customer service prompted that the old domain name of Old Wei had pointed to the website of the new domain name. After testing, Old Wei found that the content of the website opened after entering the old domain name in the browser was a new domain name, but the address bar still displayed the old domain name.The new domain name will be displayed when you click any link on the page.
The customer service said that this is already done, and the use of Parked Domains is conducive to SEO optimization.But in Lao Wei's opinion, it's not finished yet.
Yes, in the view of customer service, this is the completion of the old domain name jump to the new domain name.But is this really done?
2. Add 301 redirect code
In Lao Wei's opinion, this is not a complete 301 redirect operation, so you need to add a 301 redirect code to the htaccess file.
Enter file manager>>htaccess, click the pencil in the upper right corner, and prepare to add code.
Here we assume that the old domain name is jiuyumingcom,The new domain name (main domain name of the website) is xinyumingcom,Find RewriteEngine On and add the following code to the next line:
The red characters are the content you need to replace yourself. Note that the old domain name, the new domain name, and the suffix should be replaced with your own.
Note that SSL certificates have been added to both old and new domain names.
After adding the code, click the disk symbol above (mouse hovering will prompt Save) to save, and then click X to close the file, as shown in the following figure:
The 301 redirect code may not take effect immediately because of the cache.The next day, Lao Wei tested a variety of browsers to automatically jump, and the online check indicated 301 redirects.It was finally completed successfully.
Finally, in addition to the operation prompted by the official, Lao Wei added the 301 redirect code of htaccess himself, which also achieved the intended purpose.It is more perfect than the official recommendation.
Article name: How does Siteground implement 301 redirection of multiple domain names pointing to the same website Article link:https://www.vpsss.net/19566.html Copyright notice: The resources of this website are only for personal learning and exchange, and are not allowed to be reproduced and used for commercial purposes, otherwise, legal issues will be borne by yourself. The copyright of the pictures belongs to their respective creators, and the picture watermark is for the purpose of preventing unscrupulous people from stealing the fruits of labor.