• Resolved cioppi

    (@cioppi)


    Hi guys,
    thanks for excellent work. I just buy unlimited license!

    I notice you some little issue that I found when I activated wp Rocket cache.

    – Trailing slash doesn’t work correctly (page without trailing slash doesn’t redirect to page with it)

    – missing canonical tag

    How can I solve these problems? Do I have to exclude some JavaScript from cache or do you have a patch?

    Thanks.

    The page I need help with: [log in to see the link]

Viewing 15 replies - 1 through 15 (of 18 total)
  • Plugin Author Maciej Bis

    (@mbis)

    Hi @cioppi,

    The trailing slash needs to be forced with .htaccess when WP Rocket plugin is enabled:
    https://docs.wp-rocket.me/article/131-redirection-to-enforce-trailing-slash-on-urls

    When it comes to canonical (URL) metatag, do you use some 3rd party plugin (eg. Yoast SEO, RankMath, etc.)?

    Best regards,
    Maciej

    Thread Starter cioppi

    (@cioppi)

    Thanks,
    I used Rank Math

    Plugin Author Maciej Bis

    (@mbis)

    Hi @cioppi,

    Could you check if the issue with canonical URL persists if:

    • my plugin is deactivateed
    • WP Rocket is deactivated

    Please accept my apology for the inconvenience!

    Best regards,
    Maciej

    Thread Starter cioppi

    (@cioppi)

    Just tried,
    the problem still exists only with Wp rocket activated. If I disable everything work right

    Plugin Author Maciej Bis

    (@mbis)

    Ok, I am not certain where the problem is – it looks like WP Rocket strips all the meta tags if HTML minify mode is turned on.

    Could you try to enable the native function that displays the canonical URL meta tag? Please add the below line of code to functions.php in child theme directory:

    add_action( 'wp_head', 'rel_canonical' );

    Thread Starter cioppi

    (@cioppi)

    Done

    Plugin Author Maciej Bis

    (@mbis)

    Ok, I forgot about one important thing.

    The metatag with canonical URL is not added when the website is set to “noindex”:

    I think that this might be the case.

    Thread Starter cioppi

    (@cioppi)

    Try now

    Plugin Author Maciej Bis

    (@mbis)

    Looks like it is working now when the “robots” tag is no longer set to “noindex”:
    https://prnt.sc/sobzir

    Thread Starter cioppi

    (@cioppi)

    Now wp rocket is active.

    Plugin Author Maciej Bis

    (@mbis)

    Please flush the cache, it looks like it still stores the expired HTML output:
    https://prnt.sc/soc2s6

    Thread Starter cioppi

    (@cioppi)

    Flushed

    Plugin Author Maciej Bis

    (@mbis)

    Thank you. Works fine on my side šŸ™‚
    https://prnt.sc/soc4ye

    Thread Starter cioppi

    (@cioppi)

    I’ll check tomorrow with chrome developer tool.
    Thanks for excellent support.
    I’ll fix htaccess and try if everything fine.
    Thank you very much.

    Thread Starter cioppi

    (@cioppi)

    But problem still exist for URL without trailing slash.

    The canonical for URL without trailing slash is canonicalized self. So I have two different URL with same content.

    Do you think that htaccess will dove problem?

Viewing 15 replies - 1 through 15 (of 18 total)

The topic ‘Issue with Wp Rocket’ is closed to new replies.