Title: HTTPS Protocol Rewriting breaks Canonical Links
Last modified: August 31, 2016

---

# HTTPS Protocol Rewriting breaks Canonical Links

 *  [Shane](https://wordpress.org/support/users/nom_swalker/)
 * (@nom_swalker)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/https-protocol-rewriting-breaks-canonical-links/)
 * I think your protocol rewriting is some of the best that is available out there
   for WordPress right now. However, in doing so it is also killing the canonical
   links and dropping the protocol on them.
 * According to the research I’ve done, this creates a lot of duplicate content 
   issues and if you’re looking to have the best available SEO for your site it 
   removes that ability.
 * Would there be any way to not perform rewrites on canonical links?
 * [https://wordpress.org/plugins/cloudflare/](https://wordpress.org/plugins/cloudflare/)

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

 *  [marhgil](https://wordpress.org/support/users/marhgil/)
 * (@marhgil)
 * [10 years ago](https://wordpress.org/support/topic/https-protocol-rewriting-breaks-canonical-links/#post-7127402)
 * Seems like they fixed this on version 1.3.16 but it was gone on 1.3.17 onwards.
   If you know how to edit the plugin, find this line on cloudflare.php:
 *     ```
       $re = "/(<(script|link|base|img|form)([^>]*)(href|src|action)=[\"'])https?:\\/\\//i";
       ```
   
 * and replace it with this line:
 *     ```
       $re = "/(<(script|link|base|img|form)([^>]*)(?<!rel=['\"]canonical['\"] )(href|src|action)=[\"'])https?:\\/\\//i";
       ```
   
 * that should fix it. I also opened a support request on Cloudflare telling them
   about this problem. Hopefully, this will be fixed on the next plugin update.
 *  [marhgil](https://wordpress.org/support/users/marhgil/)
 * (@marhgil)
 * [10 years ago](https://wordpress.org/support/topic/https-protocol-rewriting-breaks-canonical-links/#post-7127403)
 * [@jwineman](https://wordpress.org/support/users/jwineman/) can you verify if 
   this has been fixed in 1.3.24? i checked the code and it’s not fixed yet. your
   support in Cloudflare (Damian S) kept telling me it’s already resolved.
 *  [jwineman](https://wordpress.org/support/users/jwineman/)
 * (@jwineman)
 * [10 years ago](https://wordpress.org/support/topic/https-protocol-rewriting-breaks-canonical-links/#post-7127404)
 * [@marhgil](https://wordpress.org/support/users/marhgil/) This was not fixed in
   1.3.24. I’ve created a ticket to track this internally and we’ll try to get it
   in to 1.3.25
 *  [nabtron](https://wordpress.org/support/users/nabtron/)
 * (@nabtron)
 * [9 years, 12 months ago](https://wordpress.org/support/topic/https-protocol-rewriting-breaks-canonical-links/#post-7127418)
 * Thanks for the temporary solution marhgil!
 * I hope cloudflare team fixes it soon in their plugin!

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

The topic ‘HTTPS Protocol Rewriting breaks Canonical Links’ is closed to new replies.

 * ![](https://ps.w.org/cloudflare/assets/icon-256x256.png?rev=2471183)
 * [Cloudflare](https://wordpress.org/plugins/cloudflare/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/cloudflare/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/cloudflare/)
 * [Active Topics](https://wordpress.org/support/plugin/cloudflare/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/cloudflare/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/cloudflare/reviews/)

## Tags

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

 * 4 replies
 * 4 participants
 * Last reply from: [nabtron](https://wordpress.org/support/users/nabtron/)
 * Last activity: [9 years, 12 months ago](https://wordpress.org/support/topic/https-protocol-rewriting-breaks-canonical-links/#post-7127418)
 * Status: not resolved