4

In the age of SSL everywhere there are still major sites that lack it. Schema.org for example allows HTTPS but resolves naturally to HTTP. Seems like it would make sense to call upon the HTTPS identifiers right? But then again, why would HTTP be available on Schema if Google owns it...maybe theres a legacy compatible reason.

Which one of these makes more sense? Should I call relative URL's or strict HTTPS on the itemtype identifier URL's, or does it not even matter?

Relative URL's:

<div itemscope itemtype="//schema.org/Organization">
    <!-- organization stuff -->
</div>

Strict HTTPS:

<div itemscope itemtype="https://schema.org/Organization">
    <!-- organization stuff -->
</div>

2 Answers 2

5

Don’t use protocol-relative Schema.org URIs:

  • I wouldn’t expect all Microdata consumers to handle these URIs correctly (while it’s common for links or embedded resources, values of the itemtype attribute typically don’t get dereferenced).

  • They fail when a different protocol than HTTP/HTTPS is used (for example, file). It’s not just that the link is broken then (well, there is no "link" anyway), but that the identifier for the Schema.org vocabulary/types/properties no longer works: Schema.org consumers will likely fail recognizing that your Microdata is using the Schema.org vocabulary (well, because it isn’t in case of different protocols).

Regarding HTTP vs. HTTPS, see also my answer to a similar (not duplicate) question: I’d recommend to always use the HTTP variant of Schema.org URIs.

1
  • Thanks, the links in your other answer lay it out pretty well. Maybe down the road they will change the requirements and allow HTTPS strict. I see what you mean about relative too, makes sense.
    – dhaupin
    Commented Nov 11, 2014 at 14:20
0

You could use either, but if you want to force HTTPS then just specify it as then you take any decision-making about it away from the web-browser.

// would be more suited for use on a website where some of your URL's will be http:// and some https:// and this method can enable you to load resources using the same protocol as the main page requested.

HTTP is not being phased out by any means and not all websites are moving to HTTPS, because the purpose of using SSL certificates on websites is to protect data in transit between a web browser client and the web server. If a website only has publicly available content on its pages with no secure login areas or form fields, for example a corporate website or personal blog, then the additional annual cost of purchasing an SSL certificate may seem unjustified. Keeping the schema.org site working on both HTTP and HTTPS ensures compatibility with all uses moving forward, and it doesn't cost any extra to provide HTTP!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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