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.
Directly testing your website’s main server allows you to:
There are two primary methods for testing the main server connection without disabling the VergeCloud CDN:
Editing the operating system's hosts file allows you to bypass external DNS resolution and connect directly to the main server.
Search for "Notepad" in the Start Menu, right-click the result, and select "Run as Administrator."
In Notepad, go to File > Open and enter the following path:
c:\windows\system32\drivers\etc\hostsAt the end of the file, add a line in the following format:
example.com x.x.x.xReplace example.com with your domain name and x.x.x.x with your server's IP address.
Save the file and close Notepad.
Run the following command to edit the hosts file:
sudo nano /etc/hostsAdd the server's IP address, press Tab, and type your domain name. For example:
x.x.x.x example.comPress Ctrl+X, then Y, and hit Enter to save and exit.
Search for "Terminal" in Spotlight or go to Finder > Applications > Utilities > Terminal.
Run the following command to open the hosts file:
sudo nano /private/etc/hostsAdd a line in the format:
x.x.x.x example.comReplace x.x.x.x with the server's IP address and example.com with your domain.
After saving the file, run the following command to flush the DNS cache:
dscacheutil -flushcacheThe cURL tool allows you to send requests directly to a specific IP address without modifying the hosts file. Follow these steps:
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.
Use the following command format:
curl --resolve hostname:port:DESTINATIONIPADDRESS http(s)://example.comhostname: 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.comCheck 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).
#, so it is ignored during normal operations.