Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

If a secure HTTPS page has a canonical tag referencing the HTTP version, will this cause the message in the browser that the page is using unsecure elements and prevent the green lock icon appearing?

e.g

https://wwww.example.com/

has the following canonical tag defined:

<link rel="canonical" href="http://wwww.example.com/" />

I know if that if other elements on a HTTPS page are called unsecured via HTTP you get the following warning in browsers:

enter image description here

As opposed to the lock icon:

enter image description here

Will this also happen if the canonical tag is using HTTP? I've read else where that it wont, but I'd like to see a live example.

share|improve this question
1  
Here's a live example. (Note that HTTPS support on SE is still experimental, and in particular, some pages may still have insecure images. However, user profile pages shouldn't have any, at least if the user in question is using Gravatar for their user icon.) –  Ilmari Karonen Jul 17 at 14:15
    
Fantastic, that's great thanks. –  Max Jul 17 at 23:01

2 Answers 2

up vote 8 down vote accepted

Web browsers do not care about canonical URLs. It is for search engine use only (specifically Google).

Additionally, canonical URLs do not affect the loading or rendering of a web page. So no assets will be loaded over HTTP which is what would cause an insecure error message.

So, no, they will not display any error message.

share|improve this answer
    
Do you have an example? Even though its within a canonical tag, there is still http being referenced within the page code. So makes me think it may still see the http. –  Max Jul 17 at 1:58
    
Seeing and being pertinent are two different things. HTML tags have purpose. This tag's purpose are of no concern to browsers (just like meta tags). –  John Conde Jul 17 at 2:02
1  
The key here is to understand what canonical links are intended for, as specified in RFC 6596: The canonical link relation specifies the preferred IRI from resources with duplicative content, and only references its usage in relationship to applications such as search engines. –  dan Jul 17 at 3:29

It shouldn't. The unsecure warning comes about when a secured page incorporates non-secured elements. A canonical tag is a link, not an object to be incorporated into the page, so there's no reason why the padlock should care whether the URL it points to is http or https.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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