1

I am finishing my sharepoint online public website here: http://levalencia-public.sharepoint.com

The website has a custom master page as you can see, and it has on the left some social sharing buttons. These sharing buttons are loaded through some javascript using CDN.

As you probably know, if I am on https then those files wont be loaded by the browser, at least by google chrome.

When I make the site public and submit it search engines, I want them to crawl the http version and not the https, so the share buttons are visible everywhere.

Is this possible to do in sharepoint online? Do I have any control at all on this?

2

I assume you are talking about the following code: (Taken from your source)

<script type="text/javascript" src="http://w.sharethis.com/button/buttons.js"></script>

This throws the following error in the console for me:

[blocked] The page at 'https://levalencia-public.sharepoint.com/' was loaded over HTTPS, but ran insecure content from 'http://w.sharethis.com/button/buttons.js': this content should also be loaded over HTTPS.

This is because you have hard coded the protocol (http) in the src.

A better approach will be to use protocol relative urls:

<script type="text/javascript" src="//w.sharethis.com/button/buttons.js"></script>

which will determine the current protocol and appropriately load either the http or the https version. Of course your CDN must support both protocols.

More about protocol relative urls over here:

http://blog.httpwatch.com/2010/02/10/using-protocol-relative-urls-to-switch-between-http-and-https/

  • the cdn does not support them , however I guess if I create a google webmaster tools account, there I could edit the robots.txt file to manage this? – Luis Valencia Feb 25 '14 at 16:25
  • it looks like I can edit robots.txt with SPD, great! – Luis Valencia Feb 25 '14 at 16:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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