Preview website on dummy DNS – Website Testing without DNS Migration

By: Mayur
Updated: October 4, 2016 | Technology: Asp.Net, Asp.Net MVC, nopCommerce, Tips and Tricks
Preview website on dummy DNS – Website Testing without DNS Migration

In this article, I will show you how to test and preview website on your local network or local PC without registering a domain name or worrying about DNS migration time.

This is the time-saving trick for preview website on dummy DNS without affecting to website data or designing. Here we are going to mention all the steps to create dummy domain name system(dummy DNS) without registration with the screenshot. So that you can check the live website preview on local DNS, most important for showing your developed website to clients and share URL through which client able to test newly developed website using dummy DNS.

Problem:

In general, Web Developers are working on many projects and want to see developed website preview. in many cases, when he wants to show their web development works to his client or project manager on the web browser. Suppose, web developer wants to share URL with a client for the website testing purpose. it is applicable especially when the developer could not manually configure an actual domain for their website project with different PC or laptops.

How do we create dummy domain name system (DNS) without registration? Why do we need dummy DNS?

Solution:

Here is the best web developer trick for overcome website testing in short time and for impress, your client, follow the below steps carefully through which we can create a dummy domain and we can live dummy domain using Host file.

  1. First of all, You need to configure IIS on your PC. Please see how to configure IIS, if you are developing a first asp.net website for the first time.

    LPlease Publish and configure your code in IIS server.

    You can give any site name as you like in the site name text box. Give source code path as the physical path. Give hostname what you prefer. click the Ok button.

    dummy dns
  2. Run your application from IIS. Please click on recently created dummy domain name from the right side navigation menu to see the website on the browser.
    dummy dns
  3. It displays nothing as you can see in the below screenshot. It should show a message like “Click here to buy DummyDomain.com for your website name!”. In this case, this website has not any purchased domain name.
    dummy dns
  4. Now,we are going to change some setting in the Host file. You can find host file from the path: “C:\Windows\System32\drivers\etc\hosts

    Open the host file with run as administrator in the notepad. Add your IP address and domain name in the opened host file. Please see below screenshot for your reference.

    dummy dns
  5. Now, Refresh your browser that is already opened for the website. (Please note that you don’t get any changes, Please flush DNS https://www.whatsmydns.net/flush-dns.html)
    dummy dns
  6. Share your dummy domain name and IP address with the person who is live on this website & who wants to test your website and please tell that person to follow all the steps after Step – 3.

Note:
Preview Website
For Ubuntu, To open host file in the Ubuntu operating system, Use  sudo -i gedit /etc/hosts command on terminal.  And you can add  “192.16.0.21 xyz.com” in the host file.

For windows,

Add line 192.168.134.207 xyz.com in the host file.Host file path:   C:\Windows\System32\drivers\etc\hosts

Preview Website For Mac OS, To open host file in the Mac operating system, Use  sudo nano /etc/hosts command on terminal.  And you can add  “192.16.0.21 xyz.com” in the host file.

Conclusion:

We need to do following modification in the host file and we are able to create dummy domain. Developers can save the time by using this website testing and deploying trick for preview website.

Add Current IP address and dummy domain in the host file as mention in Step- 4.

Keep being with us for more latest development tricks and tips for the programming.