[ back to the ad server index page
| php source
| convert hosts files to BIND config files
Using the form below, you can create a zone file for use with the BIND DNS server. It's pretty basic, but it allows you to import an existing hosts file as the list of A records set up. This is useful for things like ad blocking, as it is much more efficient than distributing hosts files around a network.
- To convert a hosts file, you either need to paste it into the text area, or choose a file to upload.
- The maximum file upload size is 5 MB, and the maximum amount of data you can put in the textarea is 9 MB, hopefully enough for a hosts file. If your hosts file is bigger than this, have a look through the ODP's File Splitters category for an application that will split it into smaller chunks.
- All hostnames found are assumed to belong to the specified domain. Fully qualified hostnames are considered to be those ending in the domain, which is stripped off before adding to the zone file. eg, if the domain submitted was "example.com", a hostname like "charlie.example.com" would be seen as fully qualified and be included as just "charlie".
- Hosts are converted to lowercase before output.
- The fields below are used for various parts of the zone file. Required fields are in bold.
- For more information about BIND zone files, there's a pretty good overview at Allegiance Internet that should answer most questions, and the official documentation describes the format in detail. You should really have a general understanding DNS as a whole of DNS as a whole if you want to make sense of everything, though.
- If you're thinking of using BIND to block ads, you might find this null zone file useful.