diff --git a/robots.txt b/robots.txt new file mode 100644 index 00000000000..1f53798bb4f --- /dev/null +++ b/robots.txt @@ -0,0 +1,2 @@ +User-agent: * +Disallow: / diff --git a/src/cmd/godoc/godoc.go b/src/cmd/godoc/godoc.go index c91dc33dbbc..c0943cd6080 100644 --- a/src/cmd/godoc/godoc.go +++ b/src/cmd/godoc/godoc.go @@ -91,6 +91,7 @@ func registerPublicHandlers(mux *http.ServeMux) { mux.Handle(pkgHandler.pattern, &pkgHandler) mux.HandleFunc("/doc/codewalk/", codewalk) mux.HandleFunc("/search", search) + mux.Handle("/robots.txt", fileServer) mux.HandleFunc("/", serveFile) }