Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Situation Awareness
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive
Help Center/ Elastic Cloud Server/ FAQs/ Slow Website or Application Response/ Why Accessing a Website Outside the Chinese Mainland Is Slow on an ECS?

Why Accessing a Website Outside the Chinese Mainland Is Slow on an ECS?

Updated on 2025-01-10 GMT+08:00

Symptom

Websites outside the Chinese mainland, including those in Hong Kong (China), Macao (China), Taiwan (China), and other countries and regions, may be slow to access.

Generally, an international line is used for accessing websites outside the Chinese mainland. However, the international line may inevitably pass through network nodes distributed around the world, resulting in high latency.

Solution

  • Purchase an ECS in a region (such as CN-Hong Kong) outside the Chinese mainland.

    Considering the physical distance and network infrastructure, you can purchase an ECS in a region outside the Chinese mainland if you need to access websites outside the Chinese mainland.

    For example, select the CN-Hong Kong region during the ECS purchase.

    Figure 1 Buying an ECS in CN-Hong Kong

Modifying the DNS Configuration

Change the DNS server addresses to public DNS server addresses, for example, 101.226.4.6 and 1.1.1.1.

The following figure demonstrates how to modify the DNS configuration on an ECS running Windows Server 2012.

Figure 2 Modifying the DNS configuration

The following are detailed operations:

  1. Log in to the Windows ECS as user Administrator.
  2. Enable the local area connection.
    1. In the lower right corner of the taskbar, right-click the network connection icon.
    2. Click Open Network and Sharing Center.
      Figure 3 Open Network and Sharing Center
    3. In the navigation pane on the left, click Change adapter settings.
  3. Configure the DNS server for the ECS.
    1. Double-click network connections.
    2. Click Properties in the lower left corner.
      Figure 4 Local area connection
    3. Select Internet Protocol Version 4 (TCP/IPv4) and click Properties.
      Figure 5 Selecting a protocol type
    4. Select Use the following DNS server addresses and set the IP addresses of the DNS servers as prompted.
      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:

Method 1: Pinging the Domain Name

The following figure 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.)

Figure 7 Modifying the hosts file

The following are detailed operations:

  1. Ping www.example.com and wait for the result.
    Figure 8 Command output
  2. Ping the domain name repeatedly and record a stable IP address with the smallest TTL value.
    CAUTION:

    During the ping operation, run the ipconfig /flushdns command to refresh the DNS resolution cache. Otherwise, the same IP address will be pinged continuously.

    In this example, IP address 93.184.216.34 has the smallest TTL value.

  3. Modify the hosts file.

    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.

    For example, if the obtained IP address is 93.184.216.34, enter 93.184.216.34 www.example.com in the end of the hosts file, save and exit the file.

    CAUTION:
    • Exercise caution when you modify the hosts file.

      You are advised to back up the hosts file using either of the following methods: Copy and paste the hosts file, or copy and paste the content of the hosts file.

    • 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 still 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.
  4. Access the website again.

    Modifying the hosts file can only speed up the website access. If the problem persists, purchase an ECS in a region outside the Chinese Mainland, for example, CN-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:

  1. Log in to your ECS as user Administrator.
  2. Use a browser to access the ping tool.
  3. 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.)
  4. Download PingInfoView, decompress it, and run PingInfoView.exe.
  5. Open PingInfoView, copy the IP addresses obtained in step 3 to the text box, and click OK.

  6. Copy one IP address in the search result.

  7. 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.
    CAUTION:
    • Exercise caution when you modify the hosts file.

      You are advised to back up the hosts file using either of the following methods: Copy and paste the hosts file, or copy and paste the content of the hosts file.

    • 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 still 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.

  8. Access the website again.

    If the fault persists, use an ECS purchased in a region outside the Chinese Mainland to access the target website.

Checking Whether the Request Is Responded

Try to access the target website. If the website can be accessed but the loading is still slow, 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

For example, run ping -t www.example.com.

NOTE:

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.

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback