All Products
Search
Document Center

:Fix website access caused by inconsistent DNS resolution

Last Updated:Jun 21, 2026

This topic covers the symptoms, causes, and resolution of website access failures on a Windows instance due to inconsistent DNS resolution.

Symptoms

You cannot access a website from a browser on your Windows instance, but you can access it from other devices. This issue can occur when DNS resolution for the domain on the instance is inconsistent with your local network.

  1. You cannot access the website from the Windows instance, but you can access it from your local computer.

    The browser displays an ERR_CONNECTION_TIMED_OUT error, indicating that the website took too long to respond.

  2. Log on to the Windows instance. In Command Prompt, run the ping <website_domain> and nslookup <website_domain> commands. The output shows that the DNS resolution on the instance is inconsistent with your local network:

    Microsoft Windows [Version 10.0.17763.3770]
    (c) 2018 Microsoft Corporation. All rights reserved.
    C:\Users\Administrator>ping www.xxx.com
    Pinging www.xxx.com [192.xxx.22] with 32 bytes of data:
    Control-C
    ^C
    C:\Users\Administrator>nslookup www.xxx.com
    Server:  UnKnown
    Address:  100.xxx.136
    Non-authoritative answer:
    Name:    www.xxx.com xxx
    Addresses:  xxx::3f9
              xxx::3fa
              xxx.244
              xxx.243
    Aliases:  www.xxx.com
    C:\Users\Administrator>

Causes

Possible causes for the inconsistent DNS resolution between the Windows instance and your local network include:

Resolution

Note

The steps in this topic use an instance running Windows Server 2019 Datacenter as an example. The procedure may vary for other Windows versions.

Flush the DNS cache

  1. Connect to the Windows instance.

    For more information, see Connect to an ECS instance.

  2. Flush the DNS cache on the Windows operating system.

    1. In the search box, enter cmd, and then click Command Prompt.

    2. In Command Prompt, run the ipconfig /flushdns command to flush the DNS cache.

      C:\>ipconfig /flushdns
      Windows IP Configuration
      Successfully flushed the DNS Resolver Cache.
  3. In Command Prompt, run the ping <website_domain> command to verify that DNS resolution is working correctly.

    DNS resolution should now work correctly. The following example shows a successful response.

    C:\>ping www.xxx.com
    Pinging www.xxx.com.xxx [115.xxx.xxx.253] with 32 bytes of data:
    Reply from 115.xxx.253: bytes=32 time=39ms TTL=101
    Reply from 115.xxx.253: bytes=32 time=39ms TTL=101
    Reply from 115.xxx.253: bytes=32 time=38ms TTL=101
    Reply from 115.xxx.253: bytes=32 time=41ms TTL=101
    Ping statistics for 115.xxx.253:
        Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
    Approximate round trip times in milli-seconds:
        Minimum = 38ms, Maximum = 41ms, Average = 39ms
  4. Try accessing the website again in your browser.

Remove the conflicting hosts entry

  1. Connect to the Windows instance.

    For more information, see Connect to an ECS instance.

  2. Remove the conflicting mapping for the website from the hosts file.

    Open the C:\Windows\System32\drivers\etc\hosts file. Check for an entry related to the website. If an entry such as 192.xxx.xxx.22 www.xxx.com exists, delete the entire line and save the file. For example:

    # Copyright (c) 1993-2009 Microsoft Corp.
    #
    # This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
    #
    # This file contains the mappings of IP addresses to host names. Each
    # entry should be kept on an individual line. The IP address should
    # be placed in the first column followed by the corresponding host name.
    # The IP address and the host name should be separated by at least one
    # space.
    #
    # Additionally, comments (such as these) may be inserted on individual
    # lines or following the machine name denoted by a '#' symbol.
    #
    # For example:
    #
    #      102.xxx.xxx.xxx     rhxxx.xxx com          # source server
    #       38.xxx.xxx.xxx     x.xxx com              # x client host
    # localhost name resolution is handled within DNS itself.
    127.0.0.1       localhost
    192.xxx.xxx.22    www.xxx.com
  3. In Command Prompt, run the ping <website_domain> command to verify that DNS resolution is working correctly.

  4. Try accessing the website again in your browser.

Modify the PrivateZone record

  1. Perform the following checks:

    1. Verify that the VPC of your Windows instance is included in the effective scope of the domain. If not, add the correct VPC in the Alibaba Cloud DNS console. For more information, see Set the effective scope for a domain.

    2. Check if the configured DNS records are consistent with your business usage. If they are not, you need to modify the DNS records. For more information, see Modify DNS Records.

  2. Try accessing the website again in your browser.

    Important

    The Windows instance automatically polls for and applies PrivateZone record updates every minute. No further action is required.