• 16 September 2024

After activating the ArvanCloud content distribution network or CDN, the cloud icon in the user panel will turn on for your website. When this icon turns on, the address for your website’s main host server will be hidden behind ArvanCloud servers, and the response to checking the website with its name on tools such as ping and traceroute will be returned by ArvanCloud servers.

It is sometimes necessary, however, to directly investigate the website’s main host server. For example, whenever the 500 family of errors are displayed, one should make sure about connection integrity and server performance, since the 500 family of errors indicate issues regarding the website’s main host server.

The following two methods can be used to investigate the main server connection integrity without turning off the cloud icon:

  • Manually setting the website’s main host server domain name and IP address in the operating system hosts file
  • Using the cURLtool

The First Method, Manually Setting the Website’s Main Host Server Domain Name and IP Address in the Hosts File

Windows Operating System

When resolving the domain name to an IP address, the system first reviews the local DNS file (hosts file) before it refers to the DNS server configured for the gateway (modem). Adding the website’s main host server domain name and IP address to this file makes the system do it directly and without referring to any external DNS server.

To access this file in the Windows 8, 8.1 and 10 operating systems, use search to find Notepad and right click and select Run as Administrator after its icon is displayed.

Then, from the File menu, select Option and enter the “c:\windows\system32\drivers\etc\hosts” address in the window and click open.

You can add the website’s name and IP address at the end of this file in the format explained previously (for example, example.com x.x.x.x), and then save and close it.

Linux Operating System

Open the terminal window and enter the following command.

sudo nano /etc/hosts

After entering the command above, the system will ask you for a password. You can access the hosts file’s contents by entering the correct password. Then, enter the website’s main host server IP address, press tab, and enter your domain name in the hosts file.

Mac OS

Enter search in the terminal section and click on the icon found (or open Finder and go to Application Utilities and select the terminal option.) Then, enter the following command in the terminal window:

sudo nano /private/etc/hosts

After entering the command above, the system will ask you for a password (the password used for logging into the system). Enter the password to access the host file’s contents. Enter your IP address and domain name and press Ctrl+X to save changes. You can also use the command below to clear the DNS cache and apply saved changes immediately:

dscacheutil –flushcache

Note: In all the three states mentioned above you can use “#” before the line that you add to the hosts file after finishing the test, so that your operating system ignores this line while referring to the hosts file. You can remove # from the beginning of the line whenever you need to test and investigate your website’s main host server again.

Second Method: Using the cURL Tool

Instead of DNS or the hosts/etc/ file, the URL set in the command can be requested from the specified address by adding the –resolve option to the cURL command.

curl --resolve hostname:port:DESTINATIONIPADDRESS http(s)://www.example.com