Title: Canonical HTTPS detection not working
Last modified: September 5, 2017

---

# Canonical HTTPS detection not working

 *  Resolved [swinggraphics](https://wordpress.org/support/users/swinggraphics/)
 * (@swinggraphics)
 * [8 years, 9 months ago](https://wordpress.org/support/topic/canonical-https-detection-not-working/)
 * I discovered the output was http for the canonical URLs and had to set it manually
   to https. We use W3TC, and on some pages the URLs for the minified CSS was http
   instead of https. When I switched the SEOF canonical setting, the W3TC URLs got
   fixed, also.

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

 *  Plugin Author [Sybre Waaijer](https://wordpress.org/support/users/cybr/)
 * (@cybr)
 * [8 years, 9 months ago](https://wordpress.org/support/topic/canonical-https-detection-not-working/#post-9471032)
 * Hi [@swinggraphics](https://wordpress.org/support/users/swinggraphics/),
 * Thanks for letting us acknowledge this issue.
 * From my understanding on this topic, W3TC isn’t biased towards the scheme set
   and will cache the page as it encounters it.
    Therefore, HTTP and HTTPS might
   get mixed. This can, without rewriting the source, caused mixed scheme issues
   and hence retention thereof.
 * I’m glad you’ve found a resolution thus far. In any case, I recommend forcing
   users to the HTTPS version of your site (through .htaccess) if you serve both.
   This, in the end, is better for SEO also.
 * If you have any more remarks or find things that might help others, feel free
   to let us know!
 *  Thread Starter [swinggraphics](https://wordpress.org/support/users/swinggraphics/)
 * (@swinggraphics)
 * [8 years, 9 months ago](https://wordpress.org/support/topic/canonical-https-detection-not-working/#post-9472945)
 * All I know is that when I changed SEO Framework’s settings, W3TC’s URLs also 
   got fixed. Is SEOF rewriting URLs by searching generated code, or modifying the
   site URL? I am not serving mixed content at all; it’s only because SEOF incorrectly
   outputs http.
 *  [Pierre LeBaux](https://wordpress.org/support/users/lebaux/)
 * (@lebaux)
 * [8 years, 9 months ago](https://wordpress.org/support/topic/canonical-https-detection-not-working/#post-9472972)
 * Hi [@swinggraphics](https://wordpress.org/support/users/swinggraphics/), just
   to add my 2 cents, have you tried the `.htaccess` fix?
 *     ```
       # BEGIN Force http to https
       <IfModule mod_rewrite.c>
       RewriteEngine On
       RewriteCond %{HTTPS} !=on
       RewriteRule ^(.*) https://%{HTTP_HOST}/$1 [R=301,L] 
       </IfModule>
       # END Force http to https
       ```
   
 * This should force SSL no matter what plugins you use. Let us know, how it went!
 *  Plugin Author [Sybre Waaijer](https://wordpress.org/support/users/cybr/)
 * (@cybr)
 * [8 years, 9 months ago](https://wordpress.org/support/topic/canonical-https-detection-not-working/#post-9473569)
 * Hi [@swinggraphics](https://wordpress.org/support/users/swinggraphics/),
 * TSF only adjusts the URLs between these HTML comments:
 *     ```
       <!-- Start The SEO Framework by Sybre Waaijer -->
       ...
       <!-- End The SEO Framework by Sybre Waaijer | 0.00159s -->
       ```
   
 * If anything else changes, then there’s a bug; or, something else likes to use
   TSF’s scheme settings, oddly enough.
 * That said, feel free to share annotations of what changes undesirably, and I’ll
   investigate.
 *  Thread Starter [swinggraphics](https://wordpress.org/support/users/swinggraphics/)
 * (@swinggraphics)
 * [8 years, 9 months ago](https://wordpress.org/support/topic/canonical-https-detection-not-working/#post-9480047)
 * [@lebaux](https://wordpress.org/support/users/lebaux/) That doesn’t solve mixed
   content errors or the fact that the source code of the page contains http urls
   when they should all be https.
 * Somehow, SEOF is misreading http vs https when it autodetects, and some weird
   interplay between SEOF and W3TC is causing this problem. So far, all seems well
   having explicitly set the SEOF option to https. Probably too difficult to troubleshoot.
 *  Plugin Author [Sybre Waaijer](https://wordpress.org/support/users/cybr/)
 * (@cybr)
 * [8 years, 9 months ago](https://wordpress.org/support/topic/canonical-https-detection-not-working/#post-9481251)
 * Hi [@swinggraphics](https://wordpress.org/support/users/swinggraphics/),
 * I’ll mark this issue for investigation. Patches will be brought with TSF 3.0.0
   if anything requires fixing.
 * In the meantime, setting the Canonical Scheme selection to HTTPS seems to work
   great for anyone else encountering this issue 🙂
 * If you find any more issues, feel free to let us know.
 * Enjoy your weekend! 😀
 *  Plugin Author [Sybre Waaijer](https://wordpress.org/support/users/cybr/)
 * (@cybr)
 * [8 years, 8 months ago](https://wordpress.org/support/topic/canonical-https-detection-not-working/#post-9559964)
 * Hi, [@swinggraphics](https://wordpress.org/support/users/swinggraphics/),
 * I’ve looked into this issue, and no compatibility issues with W3TC have been 
   found.
 * The SEO Framework’s canonical URL setting only affects URLs that The SEO Framework
   creates. It doesn’t affect any other URL.
 * If there are issues with the URLs generated by W3TC, you should contact their
   support.

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

The topic ‘Canonical HTTPS detection not working’ is closed to new replies.

 * ![](https://ps.w.org/autodescription/assets/icon.svg?rev=3000376)
 * [The SEO Framework – Fast, Automated, Effortless.](https://wordpress.org/plugins/autodescription/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/autodescription/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/autodescription/)
 * [Active Topics](https://wordpress.org/support/plugin/autodescription/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/autodescription/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/autodescription/reviews/)

## Tags

 * [htaccess](https://wordpress.org/support/topic-tag/htaccess/)
 * [HTTPS](https://wordpress.org/support/topic-tag/https/)
 * [SSL](https://wordpress.org/support/topic-tag/ssl/)
 * [W3TC](https://wordpress.org/support/topic-tag/w3tc/)

 * 7 replies
 * 3 participants
 * Last reply from: [Sybre Waaijer](https://wordpress.org/support/users/cybr/)
 * Last activity: [8 years, 8 months ago](https://wordpress.org/support/topic/canonical-https-detection-not-working/#post-9559964)
 * Status: resolved