All Products
Search
Document Center

Edge Security Acceleration:How to point a domain name to an ESA origin server without changing DNS resolution

Last Updated:Sep 16, 2025

If you encounter issues when you access an accelerated resource after you configure ESA acceleration, you can bypass ESA and access the origin server directly. This lets you compare the access performance with and without ESA acceleration to identify whether the issue is caused by the origin server.

Procedure

Use one of the following two methods to test the connection:

Modify the hosts file

You can modify the hosts file to point a domain name to the origin server. This method does not change your DNS resolution.

  1. Edit the hosts file.

    When you access a domain name in a browser, the browser first checks the hosts file for the IP address. If the hosts file does not contain an entry for the domain name, the browser queries the local DNS server.
    • In Windows, the path of the hosts file is:

      C:\Windows\System32\drivers\etc\hosts
    • In Linux, the path of the hosts file is:

      /etc/hosts
  2. Add an entry to the end of the hosts file. Use the format origin IP address domain-to-test. For example:

    192.168.0.1 example.aliyundoc.com
  3. Run the following command in a command line interface to test the domain name. Confirm that the command returns the IP address 192.168.0.1.

    ping example.aliyundoc.com
  4. Clear your browser cache. Restart the browser and access the website. The browser now retrieves data from the IP address 192.168.0.1 and does not use the ESA acceleration feature.

    Note

    If the browser returns an error, it indicates a problem with your origin server.

Use cURL to send an HTTP or HTTPS request to the origin server

You can use the cURL tool to send an HTTP or HTTPS request directly to the origin server for testing. In the following examples, 192.168.0.1 is the origin IP address and example.aliyundoc.com is the domain name to check.

Note
  • If you do not have cURL installed, see the official cURL documentation for installation instructions.

  • On Windows, you can run the curl command in a command line window. On macOS or Linux, you can run the command directly in the command line interface.

  • If the origin server uses port 80, run the following command.

    curl -voa "http://example.aliyundoc.com/" -x 192.168.0.1:80
  • If the origin server uses port 443, run the following command.

    curl -voa "http://example.aliyundoc.com/" --resolve example.aliyundoc.com:443:192.168.0.1
  • If the origin server uses a custom port, run the following command.

    curl -voa "http://example.aliyundoc.com/" -x 192.168.0.1:[$Port]
    Note

    In the command, `[$Port]` represents the custom port number.