Skip to content

Instantly share code, notes, and snippets.

@soumik-dutta
Last active May 10, 2019 15:14
Show Gist options
  • Select an option

  • Save soumik-dutta/4e3b9cd8ae9e2ca979ddd4d0fe55b574 to your computer and use it in GitHub Desktop.

Select an option

Save soumik-dutta/4e3b9cd8ae9e2ca979ddd4d0fe55b574 to your computer and use it in GitHub Desktop.
DNS entry in windows system

DNS entry in windows system

We will create a DNS entry in windows system to access our test/dev system just by using

  • test.demo.com - To access test environment
  • dev.demo.com - To access dev environment

Create an entry in the hosts file

  • Edit the following file
notepad  C:\WINDOWS\system32\drivers\etc\hosts
  • Add the following entry 'xxx.xxx.xxx.xxx replace with your actual IP address'
xxx.xxx.xxx.xxx    test.demo.com 
xxx.xxx.xxx.xxx    dev.demo.com 

Refresh the DNS resolver cache

To refresh the cache fire the following command

ipconfig /flushdns

Resetting the NetBios cache

Run this command using admin

nbtstat -R

TO see whether your entry is reflected in the DNS entry

ipconfig /displaydns | more

This will print all the DNS entries in your windows system

References

See stackoverflow

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment