Mobile app version of vmapp.org
Login or Join

Login to follow query

More posts by @Courtney195

1 Comments

Sorted by latest first Latest Oldest Best

 

@Ogunnowo487

It’s technically allowed:


RFC 6596 allows relative URLs:


Specify a relative IRI (see [RFC3986], Section 4.2).

RFC 3986 defines that a protocol-relative URL is some kind of relative reference:


A relative reference that begins with two slash characters is termed a network-path reference […]



It can become a problem if the document is accessible from more than one scheme/protocol. So if you have a HTTP and a HTTPS version (and you don’t redirect one to the other), you end up with two different canonical URLs, which defeats the purpose of using canonical.

Also note that you don’t necessarily have control over the protocols. For example, if someone downloads your document (that contains a protocol-relative canonical URL) and uses it locally (file: scheme), the canonical URL wouldn’t point to your HTTP/HTTPS URL.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme