Why Accessing a Website Outside the Chinese Mainland Is Slow on an HECS?
Symptom
Accessing a website outside the Chinese mainland may be slow on an HECS.
Generally, an international line is used for accessing a website outside the Chinese mainland. However, the international line may inevitably pass through network nodes distributed around the world, resulting in high latency.
Handling Methods
- Purchase HECSs in a region outside the Chinese mainland.
Considering the physical distance and network infrastructure, you can purchase HECSs in a region outside the Chinese mainland if you need to access websites outside the Chinese mainland.
The following uses AP-Hong Kong as an example.
Figure 1 Buying HECSs in AP-Hong Kong
- Improve the access speed.
Alternatively, perform the following operations to speed up the access.
After that, run the ping -t Website address command to check the packet loss. For details, see Checking Whether the Request Is Responded.
Modifying the DNS Configuration
Change the DNS server addresses to public DNS server addresses, for example, 114.114.114.114 and 8.8.8.8.
Figure 2 demonstrates how you can modify the DNS configuration on Windows Server 2012.
The following are detailed operations:
- Log in to the HECS as user Administrator.
- Enable the local area connection.
- In the lower right corner of the taskbar, right-click the network connection icon.
- Click Open Network and Sharing Center. Figure 3 Open Network and Sharing Center
- In the navigation pane on the left, click Change adapter settings.
- Configure the DNS server addresses of the HECS.
- Double-click network connections.
- Click Properties in the lower left corner. Figure 4 Local area connection
- Select Internet Protocol Version 4 (TCP/IPv4) and click Properties. Figure 5 Selecting a protocol type
- Select Use the following DNS server addresses and set the DNS server addresses. Figure 6 Setting the DNS server addresses
Modifying the hosts File
Select a server that allows you to access the website at the fastest speed and add its IP address and the domain name of the website to the hosts file.
Use either of the following methods to obtain the IP address of the server that allows you to access the website at the fastest speed:
- Ping the domain name.
For details, see Method 1: Pinging the Domain Name.
- Use a ping tool and PingInfoView.
For details, see Method 2: Using a Ping Tool and PingInfoView.
Method 1: Pinging the Domain Name
Figure 7 demonstrates how you can ping the domain name on Windows Server 2012 to obtain the IP address of the server with the fastest access speed. (www.example.com is used as the example domain name.)
The following are detailed operations:
- Ping www.example.com and wait for the result. Figure 8 Command output
- Ping the domain name repeatedly and record a stable IP address with the smallest TTL value.
During the operation, run the ipconfig /flushdns command to refresh the DNS resolution cache. If you do not run the command, the same IP address will be returned.
In this example, IP address 93.184.216.34 has the smallest TTL value (TTL=44).
- Modify the hosts file.
Open the C:\Windows\System32\drivers\etc\hosts file, add the mapping between the IP address and the domain name (99.84.178.238 www.example.com) in the end of the file, save and exit the file.
- The hosts file is one of core OS files. Back up the hosts file before modifying it.
- Only the IP address you have configured in the hosts file will be returned when the domain name is used to access the website.
- If access is slow and you want to replace the IP address, delete the existing mapping from the hosts file and repeat the proceeding operations to obtain a new IP address.
- Access the website again.
Modifying the hosts file can only improve the access speed. If the problem persists, purchase HECSs in a region outside the Chinese mainland, for example, AP-Hong Kong.
Method 2: Using a Ping Tool and PingInfoView
You can also try to speed up website access by modifying the hosts file. To do so, perform the following operations:
- Log in to the HECS as user Administrator.
- Use a browser to access the ping tool.
- Enter the domain name of the website and record the IP addresses with the lowest response time. (www.example.com is used as an example.)
- Download PingInfoView, decompress it, and run PingInfoView.exe.
- Open PingInfoView, copy the IP addresses obtained in step 3 to the text box, and click OK.

- Copy one IP address in the search result.
- Open the C:\Windows\System32\drivers\etc\hosts file and add the mapping between the IP address and the domain name in the end of the file.
- The hosts file is one of core OS files. Back up the hosts file before modifying it.
- Only the IP address you have configured in the hosts file will be returned when the domain name is used to access the website.
- If access is slow and you want to replace the IP address, delete the existing mapping from the hosts file and repeat the proceeding operations to obtain a new IP address.
For example, if the obtained IP address is 99.84.178.238, enter 99.84.178.238 www.example.com in the end of the hosts file, save and exit the file.
- Access the website again.
If the fault persists, use an HECS purchased in a region outside the Chinese mainland to access the website.
Checking Whether the Request Is Responded
Try to access the website. If the website can be accessed but it is loaded slowly, packet loss may occur. In such a case, run the ping -t Website address command to check the packet loss. For details, see Troubleshooting a Ping Failure or Packet Loss Using a Link Test.
Example command: ping -t www.example.com
In Windows, you can also download the curl client, decompress it, open the bin folder, copy the path, and configure the environment variables.
If a response status code is displayed, the request has been sent and received. Slow website access may be caused by loss of packets sent to the destination server.
Contact customer service to check for packet loss. You can also use Cloud Connect to speed up website access. For details, see Communication Among Multiple VPCs Across Regions.



Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.