Skip to content

Commit d3e81a2

Browse files
adonovangopherbot
authored andcommitted
_content/site.tmpl: add canonical link
This change adds to each page a 'canonical' link so that search engines will index only the go.dev copy of a particular page instead of the tip.golang.org one. (Beware that in local testing the golangorg.hostPathHandler function rewrites https://go.dev URLs to refer to localhost, so this change does not have the desired effect in that mode.) Updates golang/go#69600 Change-Id: I5bd8b0e0ac1b1d1a0d1b67b30e600246ed0beab8 Reviewed-on: https://go-review.googlesource.com/c/website/+/712040 Reviewed-by: Sean Liao <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: Dmitri Shuralyov <[email protected]> Auto-Submit: Alan Donovan <[email protected]> Reviewed-by: Dmitri Shuralyov <[email protected]>
1 parent 694921d commit d3e81a2

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

_content/site.tmpl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
<meta charset="utf-8">
1414
<meta name="viewport" content="width=device-width, initial-scale=1">
1515
<meta name="theme-color" content="#00add8">
16+
<link rel="canonical" href="https://go.dev{{.URL}}">
1617
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Material+Icons">
1718
<link rel="stylesheet" href="/css/styles.css">
1819
<link rel="icon" href="/images/favicon-gopher.png" sizes="any">

0 commit comments

Comments
 (0)