Documentation - Hosts File Importer

Back to Documentation


The Host File Importer allows the user to import entries already configured in their Windows Hosts file.


The Host File Importer can be accessed from the Control Panel. When the importer screen loads it will automatically read the machines hosts file. The importer will only list entries that are not already configured in Refract DNS.

When the host file is read the tool will identify the following:

  • The type of record, either A or AAAA.
  • The state of the entry, enabled or disabled
  • The domain
  • The IP address

The tool will read entries where multiple domains appear on the same line after an IP address. For example the list of entries in the image above were generated from the following hosts file:

#          # source server
#              # x client host

# localhost name resolution is handled within DNS itself.
#       localhost
#	::1             localhost www.refractdns.local

After reading the file the the user can choose which entries to import, which entries should be enabled and also add a description for each record.

After importing the hosts file Refract DNS will comment out and mark imported entries. Imported entries will be prefixed with '#RDNS'. In the following example the first entry was imported but the second entry wasn't:

Before Import 

After Import


Where two domains appear on the same line but only one domain was imported Refract DNS will create a new line for the domain that wasn't imported. Refract DNS will also add a comment to indicate that the line was added. In the following example both and appeared on the same line but only was imported:

Before Import

After Import

    #RDNS #RDNS Added

Back to Documentation


Remove the frustration of the Windows hosts file and take control of your DNS.

Our Contacts

The Guild Hub, High Street
Bath BA1 5EB