question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can't set single canonical link of a post

See original GitHub issue

Issue Summary

I believe #1388 created a possible issue where you can’t define your own canonical link of a post.

Steps to Reproduce

  1. Set up a default instance of Ghost (with the default casper theme)
  2. Create a new page
  3. Under Post Settings > Code injection, add a canonical link to the page (ie <link rel="canonical" href="https://example.com/some-page">)
  4. 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:closed
  • Created 6 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
kevinansfieldcommented, Jan 8, 2018

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.

1reaction
kirrg001commented, Mar 12, 2019

We’ve added the ability to set a custom canonical url per post/page. Shipped in 2.17.0.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found