Preview website on dummy DNS – Website Testing without DNS Migration

In this article, I will show you how to test and preview a 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 previewing a website on dummy DNS without affecting website data or design. Here we are going to mention all the steps to create a dummy domain name system(dummy DNS) without registration with the screenshot. So that you can check the live website preview on local DNS, most importantly for showing your developed website to clients and sharing URLs through which clients are able to test the newly developed website using dummy DNS.

Problem:

In general, Web Developers are working on many projects and want to see developed website previews. in many cases, when he wants to show their web development works to his client or project manager on the web browser. Suppose, a web developer wants to share a URL with a client for website testing purposes. 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 a dummy domain name system (DNS) without registration? Why do we need dummy DNS?

Solution:

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

  1. First of all, You need to configure IIS on your PC. Please see [how to configure IIS](https://support.microsoft.com/en-in/kb/323972), if you are developing a first asp.net website for the first time.Please publish and configure your code in the IIS server.You can give any site name you like in the site name text box. Give the source code path as the physical path. Give the hostname that you prefer. click the Ok button.

    dummy dns

  2. Run your application from IIS. Please click on a 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:WindowsSystem32driversetchosts”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:WindowsSystem32driversetchosts

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 the following modifications in the host file and we are able to create a 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 mentioned in Step 4.

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

Article by

Chintan Prajapati

Chintan Prajapati, a seasoned computer engineer with over 20 years in the software industry, is the Founder and CEO of Satva Solutions. His expertise lies in Accounting & ERP Integrations, RPA, and developing technology solutions around leading ERP and accounting software, focusing on using Responsible AI and ML in fintech solutions. Chintan holds a BE in Computer Engineering and is a Microsoft Certified Professional, Microsoft Certified Technology Specialist, Certified Azure Solution Developer, Certified Intuit Developer, and Xero Developer.Throughout his career, Chintan has significantly impacted the accounting industry by consulting and delivering integrations and automation solutions that have saved thousands of man-hours. He aims to provide readers with insightful, practical advice on leveraging technology for business efficiency.Outside of his professional work, Chintan enjoys trekking and bird-watching. Guided by the philosophy, "Deliver the highest value to clients". Chintan continues to drive innovation and excellence in digital transformation strategies from his base in Ahmedabad, India.