• Shane

    (@nom_swalker)


    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/

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

    (@marhgil)

    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

    (@marhgil)

    @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

    (@jwineman)

    @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

    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.