• Resolved cck23

    (@cck23)


    hello. Thank you for creating such a wonderful plugin!
    I really like this plugin, but using the option to change URLs to relative also changes canonical, which SearchConsole will point out.
    I would appreciate it if you could exclude Canonical if possible. (or add such an option) Best.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Tim Eckel

    (@teckel)

    I don’t follow. It should just be removing the protocol and the domain from links. If the link is canonical or not shouldn’t be touched as that’s the query portion of the URL. Maybe an example would be helpful? I don’t have any such issue as you’re describing, and that option is a switch in the plugin, so you can turn it off as it sounds like you have a unique situation as I’ve never heard of it.

    Thread Starter cck23

    (@cck23)

    @teckel

    thank you for your reply.
    An example is given below.

    1.No option
    <link rel="canonical" >
    <link rel="stylesheet" >
    <script src="https://example.com/wp-content/themes/theme1/script.jp"></script>

    2. With current options
    <link rel="canonical" href="/post-111">
    <link rel="stylesheet" href="/wp-content/themes/theme1/style.css">
    <script src="/wp-content/themes/theme1/script.jp"></script>

    3. My desired behavior
    <link rel="canonical" >
    <link rel="stylesheet" href="/wp-content/themes/theme1/style.css">
    <script src="/wp-content/themes/theme1/script.jp"></script>

    It will look like this.

    There is no problem with the current behavior in 2., but canonical believes that absolute URLs are preferable, and I thought it would be nice to have a function that could exclude specific URLs like this.

    Best.

    Plugin Author Tim Eckel

    (@teckel)

    Got it. The added cononical tags would kind of defeat the purpose of MininifyHTML. Turning off the setting which removes the protocol and domain from links would be preferred. That’s why there’s an option to turn it off. If you feel you don’t want links changed to relative.

    Also, Google does say “relative paths are supported by Google” in regards to cononical links. The suggestion not to use them is if in case you exposed a testing domain to the search engine. This should be made physically impossible anyway, so using relative paths with cononical links isn’t a problem anyway. Sounds like an overzealous warning, I’d leave relative links on.

    • This reply was modified 3 months, 1 week ago by Tim Eckel.
    Thread Starter cck23

    (@cck23)

    @teckel
    thank you for your reply.
    I’ve got it. I will consider further, including what you have told me.
    Thank you for your wonderful support??

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.