[レベル: 上級] JavaScript によって挿入した rel="canonical" を Google は認識、処理できます。 JS 挿入の rel=canonical をサポートしなかったのは昔の話 「レンダリング前の、初期状態の HTML コードにある rel=”canonical” だけを Google は処理する」と John Mueller がちょっと前に言っていたが今でもそうなのか? Google の Martin Splitt(マーティン・スプリット)氏に Twitter でこのように質問したユーザーがいました。 @g33konaut Does Google still only process rel="canonical" in the initially fetched, non-rendered HTML? John tweeted this a while a
![JavaScript挿入したrel=canonicalをGoogleは処理できる](https://cdn-ak-scissors.b.st-hatena.com/image/square/1e4b032119f1e1719ee030f8ae4d9c2aa232b5c0/height=288;version=1;width=512/https%3A%2F%2Fwww.suzukikenichi.com%2Fblog%2Fwp-content%2Fuploads%2Fprogrammer-5863772-600x358.jpg)