Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 301029

<link rel=“canonical” href=“/relative/url” /> href should be absolute

$
0
0

Drupal 8 creates <link rel="canonical" href="/relative/url" /> by default. support.google.com says:

Use absolute paths rather than relative paths with the rel="canonical" link element.

Use this structure: https://www.example.com/dresses/green/greendresss.html Not this structure: /dresses/green/greendress.html

I used the Google Search Console URL Inspection and found Google does not recognize relative urls as canonical. It says:

User-declared canonical N/A

This caused some google indexing issues with our D8 Multi-Language website.

Please see also: https://drupal.stackexchange.com/questions/270150/link-rel-canonical-hre...


Viewing all articles
Browse latest Browse all 301029

Trending Articles