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?
Add a comment
|
1 Answer
<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 neverexample.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 acontent
attribute. So this will not be understood:<link rel="canonical" content="https://example.com/" />