You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by "moonming (via GitHub)" <gi...@apache.org> on 2026/04/09 13:41:47 UTC
[PR] fix(blog): remove external canonical URLs from 57 blog posts [apisix-website]
moonming opened a new pull request, #2015:
URL: https://github.com/apache/apisix-website/pull/2015
## Summary
Remove canonical link tags pointing to external domains from 57 blog posts (53 English + 4 Chinese). These external canonicals were telling search engines that the authoritative version of these posts lives on other websites, causing Google to either de-index the APISIX blog pages or exclude them from search results entirely.
## Problem
57 blog posts contained `<link rel="canonical">` tags pointing to external websites:
| External Domain | Posts | Relationship |
|----------------|:-----:|-------------|
| blog.frankel.ch | 28 | Guest author (Nicolas Fränkel) |
| api7.ai | 8 | Parent company |
| navendu.me | 4 | Former APISIX contributor |
| linkedin.com | 2 | Author's LinkedIn articles |
| opentelemetry.io | 2 | Partner project |
| keycloak.org | 2 | Partner project |
| dapr.io | 2 | Partner project |
| openappsec.io | 1 | Integration partner |
| iambobur.com | 1 | Guest author |
| apiseven.com | 1 | API7 Chinese blog |
**SEO Impact**: When a page has a canonical URL pointing to an external domain, Google treats the external page as the authoritative version and typically excludes the local page from search results. This means ~17% of all blog posts (57 out of 323) were effectively invisible to search engines.
## Changes
Two mechanisms were used to inject external canonicals — both are removed:
1. **`<head>` blocks in markdown body** (52 files): Docusaurus MDX processor injects `<head>` content into the page's HTML head. Removed the entire `<head><link rel="canonical" href="..." /></head>` block.
2. **`canonical_url` frontmatter field** (5 files): While this field was not actually read by any code (so it didn't produce a canonical tag), it's misleading and should be cleaned up.
## Result
With external canonicals removed, Docusaurus will auto-generate self-referencing canonical URLs (e.g., `https://apisix.apache.org/blog/2024/08/01/free-tier-api-apisix/`), allowing Google to properly index and rank all 57 blog posts.
## Testing
- Verified zero `rel="canonical"` matches remain in `blog/en/blog/` and `blog/zh/blog/`
- Verified zero `canonical_url` frontmatter fields remain
- Spot-checked multiple files to confirm markdown structure is intact after removal
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(blog): remove external canonical URLs from 57 blog posts [apisix-website]
Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #2015:
URL: https://github.com/apache/apisix-website/pull/2015#discussion_r3058286135
##########
.htaccess:
##########
@@ -41,10 +41,10 @@ Redirect 302 "/slack" "https://join.slack.com/t/the-asf/shared_invite/zt-1ugrg37
Redirect 302 "/community-meeting-signup" "https://docs.google.com/forms/d/1C9bIJ3eh0bQrBdv4rPGxHDUvX4giNQ_IRCmDDOQ2mgE/"
Redirect 302 "/contributor-workshop-signup" "https://docs.google.com/forms/d/1LUER3R9-aFsUm7MhjVd_CM1xAGnkuWIe62prFH5aqAE/"
Redirect 302 "/guest-blog-post" "https://forms.gle/unQpSm7FyqkfaSSP8/"
-RedirectMatch 302 "^/docs/apisix/getting-started/$" "/docs/apisix/getting-started/README/"
-RedirectMatch 302 "^/zh/docs/apisix/getting-started/$" "/zh/docs/apisix/getting-started/README/"
-RedirectMatch 302 "^/docs/apisix/3\.2/plugins/(.*)$" "https://apache-apisix.netlify.app/docs/apisix/3.2/plugins/$1"
-RedirectMatch 302 "^/zh/docs/apisix/3\.2/plugins/(.*)$" "https://apache-apisix.netlify.app/zh/docs/apisix/3.2/plugins/$1"
+RedirectMatch 301 "^/docs/apisix/getting-started/$" "/docs/apisix/getting-started/README/"
+RedirectMatch 301 "^/zh/docs/apisix/getting-started/$" "/zh/docs/apisix/getting-started/README/"
+RedirectMatch 301 "^/docs/apisix/3\.2/plugins/(.*)$" "https://apache-apisix.netlify.app/docs/apisix/3.2/plugins/$1"
+RedirectMatch 301 "^/zh/docs/apisix/3\.2/plugins/(.*)$" "https://apache-apisix.netlify.app/zh/docs/apisix/3.2/plugins/$1"
Review Comment:
Switching these redirects from 302 to 301 makes them permanently cacheable by browsers and search engines. If the Netlify target host/path is not guaranteed to be long-lived (or could change again), consider keeping a temporary redirect (302/307) to avoid hard-to-revert caching behavior; otherwise, document why a permanent redirect is intended here.
```suggestion
RedirectMatch 302 "^/docs/apisix/3\.2/plugins/(.*)$" "https://apache-apisix.netlify.app/docs/apisix/3.2/plugins/$1"
RedirectMatch 302 "^/zh/docs/apisix/3\.2/plugins/(.*)$" "https://apache-apisix.netlify.app/zh/docs/apisix/3.2/plugins/$1"
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(blog): remove external canonical URLs from 57 blog posts [apisix-website]
Posted by "Yilialinn (via GitHub)" <gi...@apache.org>.
Yilialinn merged PR #2015:
URL: https://github.com/apache/apisix-website/pull/2015
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org