Troubleshooting With Active CDN and Enabled Cloud Icon.

Troubleshooting With Active CDN and Enabled Cloud Icon.

Testing Main Server Connection With Active CDN

When VergeCloud's CDN is enabled, the cloud icon in your user panel indicates that your website's main server address is masked behind VergeCloud's servers. Tools like ping and traceroute will return responses from VergeCloud servers instead of your original server. However, there are instances when direct testing of the main server is necessary, such as troubleshooting 500 errors, which are often related to server issues.

Why Test Main Server Connection?

Directly testing your website’s main server allows you to:

  • Identify issues related to server accessibility or configuration.
  • Check the performance of the main server without interference from CDN-related configurations.

Methods for Testing Main Server Connection

There are two primary methods for testing the main server connection without disabling the VergeCloud CDN:

  1. Manually Adding the Main Host Server’s Domain Name and IP Address to the Hosts File
  2. Using the cURL Tool

Method 1: Manually Adding the Main Host Server’s Domain Name and IP Address to the Hosts File

Editing the operating system's hosts file allows you to bypass external DNS resolution and connect directly to the main server.

Windows Operating System
  1. Open Notepad as Administrator:

    Search for "Notepad" in the Start Menu, right-click the result, and select "Run as Administrator."

  2. Open the Hosts File:

    In Notepad, go to File > Open and enter the following path:

    c:\windows\system32\drivers\etc\hosts
  3. Add the Domain and IP Address:

    At the end of the file, add a line in the following format:

    example.com x.x.x.x

    Replace example.com with your domain name and x.x.x.x with your server's IP address.

  4. Save and Close:

    Save the file and close Notepad.

Linux Operating System
  1. Open the Terminal:

    Run the following command to edit the hosts file:

    sudo nano /etc/hosts
  2. Edit the Hosts File:

    Add the server's IP address, press Tab, and type your domain name. For example:

    x.x.x.x example.com
  3. Save Changes:

    Press Ctrl+X, then Y, and hit Enter to save and exit.

MacOS
  1. Open the Terminal:

    Search for "Terminal" in Spotlight or go to Finder > Applications > Utilities > Terminal.

  2. Edit the Hosts File:

    Run the following command to open the hosts file:

    sudo nano /private/etc/hosts
  3. Add the Domain and IP Address:

    Add a line in the format:

    x.x.x.x example.com

    Replace x.x.x.x with the server's IP address and example.com with your domain.

  4. Flush DNS Cache:

    After saving the file, run the following command to flush the DNS cache:

    dscacheutil -flushcache

Method 2: Using the cURL Tool

The cURL tool allows you to send requests directly to a specific IP address without modifying the hosts file. Follow these steps:

  1. Install cURL:

    Ensure cURL is installed on your system. Most Linux and MacOS systems come with cURL pre-installed. For Windows, you can download it from the official cURL website.

  2. Run the cURL Command:

    Use the following command format:

    curl --resolve hostname:port:DESTINATIONIPADDRESS http(s)://example.com
    • hostname: Your domain name (e.g., example.com).
    • port: The port number (e.g., 80 for HTTP or 443 for HTTPS).
    • DESTINATIONIPADDRESS: The IP address of your main server.

    Example:

    curl --resolve example.com:443:192.0.2.1 https://example.com
  3. Analyze the Response:

    Check the response to verify the connection to the main server. If the server is accessible, you’ll receive the appropriate HTTP status code (e.g., 200 OK).

Considerations

  • After testing, comment out the added entry in the hosts file by prefixing the line with a #, so it is ignored during normal operations.
  • Ensure the IP address used for testing matches the one configured in your VergeCloud panel.
  • Flushing the DNS cache is essential on MacOS after editing the hosts file to apply changes immediately.
  • For the cURL method, double-check the IP address and port to ensure accurate results.

    • Related Articles

    • Troubleshooting SSL Errors on VergeCloud CDN.

      Troubleshooting SSL Errors on VergeCloud If users encounter SSL errors while visiting your website and you are utilizing VergeCloud’s content delivery network (CDN), the issue may stem from several potential causes. This guide outlines common factors ...
    • Troubleshooting Traffic Routing Through VergeCloud CDN

      After updating your NS records to utilize VergeCloud CDN, you might notice that the traffic isn’t yet routed through VergeCloud. This issue can arise due to two main reasons: Reason 1: Delay in Propagation of Changes Although you have updated your NS ...
    • Troubleshooting DNS_PROBE_FINISHED_NXDOMAIN Error on VergeCloud

      Understanding DNS_PROBE_FINISHED_NXDOMAIN Error The DNS_PROBE_FINISHED_NXDOMAIN error occurs when a DNS lookup is performed for a domain name, but no corresponding IP address is found. NXDOMAIN stands for "Non-Existent Domain," indicating that the ...
    • Troubleshooting Mixed Content Errors.

      What is the Mixed Content Error? The "Mixed Content" error occurs when a web page served over HTTPS includes assets loaded over HTTP. Browsers block this insecure content to protect users. Examples of such assets include images, scripts, or CSS files ...
    • Troubleshooting ISP Accessibility Issues with VergeCloud CDN.

      Resolving ISP Access Issues with VergeCloud If your website is inaccessible to users from specific Internet Service Providers (ISPs) while using VergeCloud's CDN, this guide provides solutions to common causes, such as firewall and rate-limiting ...