Can't set single canonical link of a post
See original GitHub issueIssue Summary
I believe #1388 created a possible issue where you can’t define your own canonical link of a post.
Steps to Reproduce
- Set up a default instance of Ghost (with the default casper theme)
- Create a new page
- Under
Post Settings
>Code injection
, add a canonical link to the page (ie<link rel="canonical" href="https://example.com/some-page">
) - Check the source code. You now have two canonical links
This makes it impossible to set a canonical link. It makes it impossible to publish an article on another site, and republish it on your own, while still pointing to the first site as the original source.
Maybe I’m missing something (should I put the canonical link elsewhere?), but I can’t find it. It would be interesting to have a separate field for the canonical link.
Technical details:
- Ghost Version: 1.18.0 (using the Ghost-Azure fork)
- Node Version: 6.10.2
- Browser/OS: any
- Database: sqlite
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Rel=canonical: the ultimate guide
Canonical URLs tell search engines that similar pages are actually the same. Learn when and how to set a URL as rel=canonical in...
Read more >Canonical URLs: A Beginner's Guide to Canonical Tags
A canonical URL is the URL of the principal version of a page when you have duplicate versions of that page on your...
Read more >Set canonical URLs for duplicate content
In the left sidebar menu, navigate to Website > Pages. Click the SEO & Crawlers tab. For pages and blog posts, select a...
Read more >5 common mistakes with rel=canonical
Mistake 1: rel=canonical to the first page of a paginated series · Mistake 2: Absolute URLs mistakenly written as relative URLs · Mistake...
Read more >Errors in post link canonical tag
In your case, since it is the same URL, you do not have to fill in that field. Please leave it blank. You...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hey @petermorlion 👋 You’re correct, it’s not possible to change the canonical link for a post. This is a known limitation in Ghost, we’re aware of it and it’s on our internal feature tracking board as part of a larger meta overhaul.
As this is a feature request I’m going to close this issue as we use Github solely for bug tracking and on-going feature work.
We’ve added the ability to set a custom canonical url per post/page. Shipped in 2.17.0.