diff --git a/layouts/alias.html b/layouts/alias.html
new file mode 100644
index 0000000000..190f81fa82
--- /dev/null
+++ b/layouts/alias.html
@@ -0,0 +1,14 @@
+
+
+
+ {{- $url := replace (replace .Permalink site.BaseURL "/") "//" "/" }}
+ {{- $url = partial "relLangPrettyUglyURL.hugo" (dict "link" $url) }}
+
+
+
+ {{- $link := "" }}
+ {{ $url }}
+
+ {{ (printf $link $url "canonical" "text/html" ($url | htmlEscape)) | safeHTML }}
+
+
diff --git a/layouts/partials/relLangPrettyUglyURL.hugo b/layouts/partials/relLangPrettyUglyURL.hugo
index 1d711c7fd9..c0ab2a6b41 100644
--- a/layouts/partials/relLangPrettyUglyURL.hugo
+++ b/layouts/partials/relLangPrettyUglyURL.hugo
@@ -1,9 +1,13 @@
{{- $to := .to }}
{{- $abs := .abs }}
{{- $basename := .basename }}
-{{- $link := $to.RelPermalink }}
-{{- if $abs }}
+{{- $link := "" }}
+{{- if isset . "link" }}
+ {{- $link = .link }}
+{{- else if $abs }}
{{- $link = $to.Permalink }}
+{{- else }}
+ {{- $link = $to.RelPermalink }}
{{- end }}
{{- if not $basename }}
{{- $basename = "index" }}