diff --git a/layouts/partials/backlinks.html b/layouts/partials/backlinks.html
index 21b26dbeb..2e978202b 100644
--- a/layouts/partials/backlinks.html
+++ b/layouts/partials/backlinks.html
@@ -1,6 +1,8 @@
Backlinks
- {{$curPage := strings.TrimRight "/" .Page.RelPermalink }}
+ {{$url := urls.Parse .Site.BaseURL }}
+ {{$host := strings.TrimRight "/" $url.Path }}
+ {{$curPage := strings.TrimPrefix $host (strings.TrimRight "/" .Page.RelPermalink) }}
{{$inbound := index $.Site.Data.linkIndex.index.backlinks $curPage}}
{{if $inbound}}
{{- range $inbound -}}