Skip to content

Specify Domain Address

In addition to blocking ads, address can also be used to specify the IP address of a domain.

Basic Configuration Method

  1. Use the address /domain/ip option to specify the IP, such as:

    address /
    address /,,

    In the address option:

    • /domain/ uses suffix matching algorithm, including subdomains.
    • ip: can be an IPv6 or IPv4 address.
  2. Set global blocking for IPV6.

    address #6

    When no domain is specified, set global rules.

  3. Specify IPv6

    address /
  4. The prefix wildcard matches the main domain name

    # prefix wild card
    # only match subdomains
    # only match the main domain name

    Note: * and - are only supported at the beginning of the domain name. Wording in other locations is not supported.

Automatically Expand PTR Records Corresponding to address

If you want to expand the PTR record corresponding to the above address, you can use the expand-ptr-from-address switch to turn on automatic expansion. The expand-ptr-from-address parameter can be set repeatedly, and the parameter takes effect for the address set after it.

expand-ptr-from-address yes
address /
expand-ptr-from-address no

Read Domain Address from hosts File

SmartDNS can read domain addresses from a hosts file by configuring the hosts-file [path] parameter.

hosts-file /etc/hosts