diff --git a/core/corehttp/ipns_hostname.go b/core/corehttp/ipns_hostname.go
index a6e8e91f5bbfeca429ca502df8d785de1e56725d..f651cc60f12f80f7829787da06fbbd0f9e96c82e 100644
--- a/core/corehttp/ipns_hostname.go
+++ b/core/corehttp/ipns_hostname.go
@@ -2,6 +2,7 @@ package corehttp
 
 import (
 	"net/http"
+	"path"
 	"strings"
 
 	"github.com/ipfs/go-ipfs/Godeps/_workspace/src/golang.org/x/net/context"
@@ -20,7 +21,7 @@ func IPNSHostnameOption() ServeOption {
 
 			host := strings.SplitN(r.Host, ":", 2)[0]
 			if p, err := n.Namesys.Resolve(ctx, host); err == nil {
-				r.URL.Path = p.String() + r.URL.Path
+				r.URL.Path = path.Join(p.String(), r.URL.Path)
 			}
 			childMux.ServeHTTP(w, r)
 		})