Documentation - Hosts File Importer

Back to Documentation

Overview

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

Importing

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:

#      102.54.94.97     rhino.acme.com          # source server
#       38.25.63.10     x.acme.com              # x client host

# localhost name resolution is handled within DNS itself.
#	127.0.0.1       localhost
#	::1             localhost

127.0.0.1 www.refractdns.local
2a00:1450:4009:808::200e staging.refractdns.com

145.125.122.26 www.refractdns.com sub.refractdns.com
#145.125.122.27 www.refractdns.com 
#145.125.122.28 www.refractdns.com

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

    145.125.122.26 sub.refractdns.com
    145.125.122.27 www.refractdns.com 
        

After Import

    #RDNS 145.125.122.26 sub.refractdns.com
    145.125.122.27 www.refractdns.com 
    

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 www.refractdns.com and sub.refractdns.com appeared on the same line but only www.refractdns.com was imported:

Before Import

    145.125.122.26 www.refractdns.com sub.refractdns.com
        

After Import

    #RDNS 145.125.122.26 www.refractdns.com sub.refractdns.com
    145.125.122.26 sub.refractdns.com #RDNS Added
        

Back to Documentation

About

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

Share
Our Contacts

The Guild Hub, High Street
Bath BA1 5EB