How to access webdock.cloud alias if DNS is not working

Last updated: December 10th 2024

Introduction

There could be some scenarios where our alias domain may not work, such as DNS provider outages. At that time, you can still use the alias on your PC/desktop. Let's see how that is possible and what to do then.

Modifying Hosts File

In order to access the alias domain when it is not working you can take advantage of the hosts file. This hosts file is present in all operating systems. When applications or web browsers make network requests , they first lookup the hosts file. This hosts file is like a DNS table that holds the domain and the IP to which it points. By modifying this file and pointing the alias to Webdock server IP we can get around the issue.

To do this, first find the find your server's IP address in your Webdock dashboard and access your computer’s host file:

On Windows:

Search for Notepad, right-click it, and select “Run as Administrator.” Then press CTRL + O and navigate to c:\Windows\System32\Drivers\etc\hosts.

On Mac:

Open the terminal and enter sudo nano /private/etc/hosts (for older Macs) or sudo nano /etc/hosts (for newer Macs).

On Linux:

Open a terminal window, type sudo nano /etc/hosts, hit enter, and log in.

Once you have the host file open, scroll to the bottom and add your Webdock server's IP address.

Follow it with a space, then enter your server alias(es) like this:

 

123.456.789.101 myserver.vps.webdock.cloud

123.456.123.45 server2.vps.webdock.cloud

 

Save your changes to the host file and exit the editor. To help your computer quickly link your domain to the Webdock server, you may need to clear the DNS cache.

Here’s how to clear the DNS cache:

  • For Windows: Open Command Prompt as an administrator and type ipconfig /flushdns.
  • For Mac: Launch Terminal and enter sudo dscacheutil -flushcache.
  • For Linux: Open Terminal and type systemd-resolve --flush-caches.

Conclusion

This short article showed you a workaround when you have problems with your Webdock server alias domain.

Feel free to contact Webdock support if you need assistance with this.

Related articles