diff --git a/core/commands/dns.go b/core/commands/dns.go index 5126a6cb153..065b4acdc9a 100644 --- a/core/commands/dns.go +++ b/core/commands/dns.go @@ -3,6 +3,7 @@ package commands import ( "fmt" "io" + "strings" namesys "github.com/ipfs/boxo/namesys" "github.com/ipfs/boxo/path" @@ -19,7 +20,7 @@ const ( var DNSCmd = &cmds.Command{ Status: cmds.Deprecated, // https://github.com/ipfs/kubo/issues/8607 Helptext: cmds.HelpText{ - Tagline: "Resolve DNSLink records.", + Tagline: "Resolve DNSLink records. Deprecated: Use 'ipfs resolve /ipns/domain-name' instead.", ShortDescription: ` This command can only recursively resolve DNSLink TXT records. It will fail to recursively resolve through IPNS keys etc. @@ -52,6 +53,10 @@ It will work across multiple DNSLinks and IPNS keys. routing = append(routing, namesys.ResolveWithDepth(1)) } + if !strings.HasPrefix(name, "/ipns/") { + name = "/ipns/" + name + } + p, err := path.NewPath(name) if err != nil { return err