Canonical Tag Bug Keeps Blog Out of Google Index
A blogger discovered that their website was not being indexed by Google due to a canonical tag bug. The issue arose when they pointed four reprints of their articles on Promptway back to their own site, causing Google to treat them as duplicate pages. This meant that the original articles were not being indexed, and instead, the duplicates on Promptway were.
The blogger realized that the root cause of the problem was a faulty canonical tag on their website's root layout, which was setting the homepage as the canonical for every page, including the archive and writer pages. This meant that Google was ignoring these pages and not indexing them.
To fix the issue, the blogger removed the canonical tags from the root layout and set self-canonicals for each indexable route, including the archive, writers index, and individual writer pages. They also added a Link: rel='canonical' header to markdown alternates pointing at the HTML article.
The solution involved deciding which page was the hub before syndicating content, ensuring that each page had its own address, and using self-canonicals for every indexable route. The blogger then requested indexing on the affected pages and waited for Google to recrawl and update their tags.