I recently started loading stylesheets on my webpages using just // instead of fighting between http:// and https://. E.g.:
<link href="//example.com/styles.css" rel="stylesheet" type="text/css" />
Now I wonder if the same should be done for the link[rel="canonical"] tags. E.g.:
<link rel="canonical" href="//example.com/index.html" />
If you do it, the purpose of
rel="canonical"is somewhat defeated, as the page now has two names (one forhttp:, one forhttps:). There’s nothing prohibiting it, but it’s probably not a good idea.Pick one or the other and make that the canonical URL.