astro-paper icon indicating copy to clipboard operation
astro-paper copied to clipboard

Incorrect use of "canonical meta tag"

Open FredySandoval opened this issue 11 months ago • 2 comments

in /src/layouts/Layout.astro line 48 <meta property="og:url" content={canonicalURL} /> this will add the same canonical tag to every page

The use of the "rel=canonical" link element is specifically intended for specifying a preferred canonical URL for duplicate or similar pages. It is not necessary for pages that do not have duplicate content or similar versions.

It's important to use the "rel=canonical" link annotation judiciously and only when it's necessary. Adding the canonical tag to every page, even when it's not needed, can lead to confusion and incorrect signals to search engines, potentially affecting your website's search rankings.

FredySandoval avatar Jul 24 '23 08:07 FredySandoval

Thank you for bringing up this concern about the use of "canonical URL". If you have any further suggestions or concerns, please feel free to share them.

Also, if you want to make a PR for this issue, let me know. If not, I'll make the necessary adjustments accordingly.

satnaing avatar Jul 25 '23 02:07 satnaing

As per RFC 6596:

The target (canonical) IRI MAY: ... Be self-referential (context IRI identical to target IRI).

So, using "rel=canonical" is not a problem on every page

r0hitm avatar Mar 21 '24 19:03 r0hitm