about summary refs log tree commit diff
diff options
context:
space:
mode:
authorjim <310223+jimmylee@users.noreply.github.com>2025-08-22 19:40:11 -0700
committerGitHub <noreply@github.com>2025-08-22 19:40:11 -0700
commit99d75708183ff0bbf71f7c54e13ed92944f078b4 (patch)
tree17e9bf529202b890e0c9de8c2e08181df002c15a
parent7b9bc52720c090bc7bdf0d4636d0227a13abfedd (diff)
parentd8c904d1d92c9685d42ac537f6a07a610b98eb43 (diff)
downloadvoidsky-99d75708183ff0bbf71f7c54e13ed92944f078b4.tar.zst
Merge pull request #8883 from internet-development/caidanw/app-1408-add-canonical-url
feat: add canonical URLs to improve SEO
-rw-r--r--bskyweb/templates/home.html1
-rw-r--r--bskyweb/templates/post.html1
-rw-r--r--bskyweb/templates/profile.html1
3 files changed, 3 insertions, 0 deletions
diff --git a/bskyweb/templates/home.html b/bskyweb/templates/home.html
index 5d3fbad85..9e5c670a2 100644
--- a/bskyweb/templates/home.html
+++ b/bskyweb/templates/home.html
@@ -12,6 +12,7 @@
 
   <meta property="og:url" content="https://bsky.app" />
   <meta name="twitter:url" content="https://bsky.app" />
+  <link rel="canonical" href="https://bsky.app" />
 
   <meta property="og:image" content="https://bsky.app/static/social-card-default-gradient.png" />
   <meta property="twitter:image" content="https://bsky.app/static/social-card-default-gradient.png"  />
diff --git a/bskyweb/templates/post.html b/bskyweb/templates/post.html
index f6f03c7ee..963af2065 100644
--- a/bskyweb/templates/post.html
+++ b/bskyweb/templates/post.html
@@ -14,6 +14,7 @@
   <meta property="profile:username" content="{{ profileView.Handle }}">
   {%- if requestURI %}
   <meta property="og:url" content="{{ requestURI }}">
+  <link rel="canonical" href="{{ requestURI }}" />
   {% endif -%}
   {%- if postView.Author.DisplayName %}
   <meta property="og:title" content="{{ postView.Author.DisplayName }} (@{{ postView.Author.Handle }})">
diff --git a/bskyweb/templates/profile.html b/bskyweb/templates/profile.html
index ab84dd157..af4180dc1 100644
--- a/bskyweb/templates/profile.html
+++ b/bskyweb/templates/profile.html
@@ -15,6 +15,7 @@
   <meta property="profile:username" content="{{ profileView.Handle }}">
   {%- if requestURI %}
   <meta property="og:url" content="{{ requestURI }}">
+  <link rel="canonical" href="{{ requestURI }}" />
   {% endif -%}
   {%- if profileView.DisplayName %}
   <meta property="og:title" content="{{ profileView.DisplayName }} (@{{ profileView.Handle }})">