1

It appears that this format is generally found when adding canonical tags to a webpage <link rel="canonical" href="https://example.com" /> However, using Open element the href is replaced by content ie <meta <link rel="canonical" content="example.com" />. Can anyone tell me if this is acceptable?

0

<meta <link rel="canonical" content="example.com" /> is invalid HTML and won't be recognized by any search engine. You can't have tags nested inside other tags like that.

Even if that is a typo in your question and you meant something else, it is still problematic.

  • Canonical URLs must be fully qualified, not just a domain name. https://example.com/page.html should be used as a canonical URL but never example.com
  • Canonical URLs cannot be specified by meta tag, only by link tag so this will not be understood: <meta rel="canonical" content="https://example.com/" />
  • Canonical URLs link tags need a href not a content attribute. So this will not be understood: <link rel="canonical" content="https://example.com/" />

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.