Title: [Plugin: WP Facebook Open Graph protocol] Forced HTTPS in OG:URL
Last modified: August 20, 2016

---

# [Plugin: WP Facebook Open Graph protocol] Forced HTTPS in OG:URL

 *  [EnlightenedShadow](https://wordpress.org/support/users/enlightenedshadow/)
 * (@enlightenedshadow)
 * [14 years, 1 month ago](https://wordpress.org/support/topic/plugin-wp-facebook-open-graph-protocol-forced-https-in-ogurl/)
 * Hey guys, I am coding for [http://affordablepaintingandwallpaper.com/](http://affordablepaintingandwallpaper.com/)
   and I recently installed the OG plugin. It works great except for one small issue.
   On the main page of the site it’s fine but on sub pages, the plugin inserts the
   OG:URL with an https instead of http. The client doesn’t want to purchase an 
   SSL and therefore the OG:URL is causing Facebook not to be able to scrap any 
   info from the page.
 * For example: what should be [http://affordablepaintingandwallpaper.com/services](http://affordablepaintingandwallpaper.com/services)
   is listing as [https://affordablepaintingandwallpaper.com/services](https://affordablepaintingandwallpaper.com/services)
   even though the link rel=”canonical” is correct. Anyone know why this plugin 
   is doing this?
 * [http://wordpress.org/extend/plugins/wp-facebook-open-graph-protocol/](http://wordpress.org/extend/plugins/wp-facebook-open-graph-protocol/)

Viewing 9 replies - 1 through 9 (of 9 total)

 *  Thread Starter [EnlightenedShadow](https://wordpress.org/support/users/enlightenedshadow/)
 * (@enlightenedshadow)
 * [14 years, 1 month ago](https://wordpress.org/support/topic/plugin-wp-facebook-open-graph-protocol-forced-https-in-ogurl/#post-2696501)
 * UPDATE: So I figured out what was generating the S on the HTTP. It was this line
   in the plugin: echo “\t<meta property=’og:url’ content=’http” . (isset($_SERVER[‘
   HTTPS’])?’s’:”) . “://”.$_SERVER[‘HTTP_HOST’] . $_SERVER[‘REQUEST_URI’].”‘ />\
   n”;
 * I removed the S and now it doesn’t generate the https. I’m not a PHP developer
   and I don’t really know exactly what the line was doing so I hope I didn’t mess
   something up and could someone explain it to me?
 *  Plugin Author [Chuck Reynolds](https://wordpress.org/support/users/ryno267/)
 * (@ryno267)
 * [14 years, 1 month ago](https://wordpress.org/support/topic/plugin-wp-facebook-open-graph-protocol-forced-https-in-ogurl/#post-2696502)
 * no reason for it to be doing that at all. It uses what your site is set to be.
   I see you don’t have it installed / running now so I can’t see but maybe another
   plugin is making pages use ssl ?
 *  Thread Starter [EnlightenedShadow](https://wordpress.org/support/users/enlightenedshadow/)
 * (@enlightenedshadow)
 * [14 years, 1 month ago](https://wordpress.org/support/topic/plugin-wp-facebook-open-graph-protocol-forced-https-in-ogurl/#post-2696504)
 * I do have it installed and running lol. I haven’t changed anything since I removed
   that S in the plugin. If it is what my server is set to, how do I change that?
   Is it something that I have to do through my hosting provider or WordPress?
 *  Plugin Author [Chuck Reynolds](https://wordpress.org/support/users/ryno267/)
 * (@ryno267)
 * [14 years, 1 month ago](https://wordpress.org/support/topic/plugin-wp-facebook-open-graph-protocol-forced-https-in-ogurl/#post-2696506)
 * well the reason i say that is because the pre-plugin and post-plugin comment 
   lines aren’t showing so can’t be sure it’s my plugin running.
 * The plugin calls the domain from php so… something somewhere is configured with
   an https… the plugin just calls what php spits out. So it’s sniffing that there’s
   an https call and changing the meta value according to that. It just spits out
   what it’s given.
 *  Thread Starter [EnlightenedShadow](https://wordpress.org/support/users/enlightenedshadow/)
 * (@enlightenedshadow)
 * [14 years, 1 month ago](https://wordpress.org/support/topic/plugin-wp-facebook-open-graph-protocol-forced-https-in-ogurl/#post-2696507)
 * OK then. Now I just have one more question. Will my change (removing the s from
   $_SERVER[‘HTTPS’] making $_SERVER[‘HTTP’]) mess up anything in my installation
   or the plugin?
 *  Plugin Author [Chuck Reynolds](https://wordpress.org/support/users/ryno267/)
 * (@ryno267)
 * [14 years, 1 month ago](https://wordpress.org/support/topic/plugin-wp-facebook-open-graph-protocol-forced-https-in-ogurl/#post-2696508)
 * technically no? but editing any plugin leaves you open for issues and overwrites
   when the plugin updates. And I’m pushing a big update either tonight or very 
   soon. FYI 🙂
 *  Thread Starter [EnlightenedShadow](https://wordpress.org/support/users/enlightenedshadow/)
 * (@enlightenedshadow)
 * [14 years, 1 month ago](https://wordpress.org/support/topic/plugin-wp-facebook-open-graph-protocol-forced-https-in-ogurl/#post-2696509)
 * OK that’s fine. I’ll have to track down that rouge HTTPS on my server. Any tools
   available to do something like that you know of?
 *  Plugin Author [Chuck Reynolds](https://wordpress.org/support/users/ryno267/)
 * (@ryno267)
 * [14 years, 1 month ago](https://wordpress.org/support/topic/plugin-wp-facebook-open-graph-protocol-forced-https-in-ogurl/#post-2696510)
 * idk man i’m like the worst server IT guy evar… my damn sendmail isn’t working
   and I can’t even figure that shit out lol. I just know WP
 *  Thread Starter [EnlightenedShadow](https://wordpress.org/support/users/enlightenedshadow/)
 * (@enlightenedshadow)
 * [14 years, 1 month ago](https://wordpress.org/support/topic/plugin-wp-facebook-open-graph-protocol-forced-https-in-ogurl/#post-2696511)
 * LOL OK then. Thanks anyway.

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘[Plugin: WP Facebook Open Graph protocol] Forced HTTPS in OG:URL’ is 
closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wp-facebook-open-graph-protocol_cfcfd0.
   svg)
 * [WP Facebook Open Graph protocol](https://wordpress.org/plugins/wp-facebook-open-graph-protocol/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-facebook-open-graph-protocol/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-facebook-open-graph-protocol/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-facebook-open-graph-protocol/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-facebook-open-graph-protocol/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-facebook-open-graph-protocol/reviews/)

 * 9 replies
 * 2 participants
 * Last reply from: [EnlightenedShadow](https://wordpress.org/support/users/enlightenedshadow/)
 * Last activity: [14 years, 1 month ago](https://wordpress.org/support/topic/plugin-wp-facebook-open-graph-protocol-forced-https-in-ogurl/#post-2696511)
 * Status: not resolved