diff --git a/links/templates/links/files/list.html b/links/templates/links/files/list.html
index e2b55d9..924e7e5 100644
--- a/links/templates/links/files/list.html
+++ b/links/templates/links/files/list.html
@@ -601,7 +601,7 @@ function fileRow(pk, isPublic, expiresAt, publicUrl) {
},
formatExpiry(dt) { return dt ? new Date(dt).toLocaleDateString() : ''; },
copyPublicUrl() {
- const url = location.origin + this.publicUrl;
+ const url = this.publicUrl.startsWith('http') ? this.publicUrl : location.origin + this.publicUrl;
const el = document.createElement('textarea');
el.value = url; el.style.cssText = 'position:fixed;opacity:0';
document.body.appendChild(el); el.select(); document.execCommand('copy'); document.body.removeChild(el);