Compatibility with Really Simple SSL plugin
In the Really Simple SSL premium plugin, it is possible to enable SSL on specific pages of a website.
Issue: When putting the homepage on SSL, the sitemap no longer works. In generating the Yoast sitemap, there is a check whether the URL is an external URL or not. It verifies the similarities with the home_url. In this case it is possible that the URL is http and the home_url is https. Because they do not match, the function returns a bad_permalink.
Possible solution: Translate both URLs to their http version and compare these. This way you exclude external URLs, but not a URL that has been put on https.
I've committed a patch for this which resolves this issue: https://github.com/Yoast/wordpress-seo/pull/8491
I've created function get_home_proto_rel_url which returns protocol-relative URL (//example.com/). It's faster way because we can use same way for checking - PR #8524.