diff --git a/upstream/upstream.go b/upstream/upstream.go
index b819b71c954e6fd3f0516ae1514a0038aa28767f..f15b101cc0c6b345c8f427fdb2f407d671930dfd 100644
--- a/upstream/upstream.go
+++ b/upstream/upstream.go
@@ -39,6 +39,11 @@ type Options struct {
 // * https://dns.adguard.com/dns-query -- DNS-over-HTTPS
 // * sdns://... -- DNS stamp (see https://dnscrypt.info/stamps-specifications)
 func AddressToUpstream(address string, opts Options) (Upstream, error) {
+
+	if address == "recursive" {
+		return &recursiveDNS{}, nil
+	}
+
 	if strings.Contains(address, "://") {
 		upstreamURL, err := url.Parse(address)
 		if err != nil {