diff --git a/app/models/project.rb b/app/models/project.rb
index a55f7a65b0b051d358ed34028cdca707d1adf7d3..1384165231c0860645e4db1278107a649a7f083e 100644
--- a/app/models/project.rb
+++ b/app/models/project.rb
@@ -201,6 +201,10 @@ class Project < ActiveRecord::Base
     [Gitlab.config.gitlab.url, path_with_namespace].join("/")
   end
 
+  def web_url_without_scheme
+    [Gitlab.config.gitlab.host, path_with_namespace].join("/")
+  end
+
   def build_commit_note(commit)
     notes.new(commit_id: commit.id, noteable_type: "Commit")
   end
diff --git a/app/views/layouts/_head.html.haml b/app/views/layouts/_head.html.haml
index d4ac92872025c06290f7d912cf8914c06e849c91..97f7e343fad6cb44c275cb2dd8d8e11c13d8e829 100644
--- a/app/views/layouts/_head.html.haml
+++ b/app/views/layouts/_head.html.haml
@@ -3,7 +3,7 @@
 
   -# Go repository retrieval support.
   - if controller_name == 'projects' && action_name == 'show'
-    %meta{name: "go-import", content: "#{Gitlab.config.gitlab.host}/#{@project.namespace.path}/#{@project.path} git http://#{Gitlab.config.gitlab.host}/#{@project.namespace.path}/#{@project.path}.git"}
+    %meta{name: "go-import", content: "#{@project.web_url_without_scheme} git #{@project.web_url}.git"}
 
   %title
     = "#{title} | " if defined?(title)