• Resolved bmarotta

    (@bmarotta)


    Hi,

    My WP runs in a subpath of my main domain:

    https://www.ohmydots.com/docs

    The canonical URL is wrong:

    <link rel=”canonical” href=”https://www.ohmydots.com/docs/docs/”>

    The docs come twice. When deactivating the AIO SEO plugin the canonical link disappears.

    Thanks in advance,

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

Viewing 5 replies - 1 through 5 (of 5 total)
  • I’m seeing the same error on one of my client’s sites as well, the directory folder the blog is in is being repeated twice.

    Thank goodness for SEM alerting us, that’s not something we check often.

    WP Version: 5.9.1
    AIO SEO Version: 4.1.8

    • This reply was modified 2 years, 8 months ago by elidawn.
    Plugin Support Shivam Tyagi

    (@shivamtyagi)

    Hi @bmarotta,

    Thank you for reporting this bug. I was able to reproduce this locally and I’ve created an internal issue for the same. We will be fixing this in one of our next releases soon.

    Hi there,
    My company hosts multiple sites using the AIOSEO plugin. They’re all in subfolders of their web root.

    All of the sites running v4.1.8 are having the same problem described above with the folder path being repeated.

    This is happening on the blog archive page, but not the single posts.

    Getting this
    /blog/blog
    Instead of this
    /blog

    This problem seems to start with v4.1.8.
    Please fix this.

    Thank you!

    Plugin Support Steve M

    (@wpsmort)

    Hi @bmarotta, @elidawn and @piercegresham,

    We’ve now released All in One SEO version 4.2.1 which fixes the issue you reported here.

    Thanks for fixing this. Now we have a new problem with the canonical entry
    At the home page of WordPress installations in subfolders:
    at https://domain.name/wordpress/ the canonical appears like:
    <link rel=”canonical” href=”https://domain.name/wordpress&#8221; />
    With Apache default “DirectorySlash On” the canonical https://domain.name/wordpress gets redirected to https://domain.name/wordpress/ with 301
    So we have canonical with 301 redirect to non-canonical URL
    We cannot set a trailing / in the WordPress main Settings as this gets removed after saving the settings. And as per definition site url should be without trailing slash.
    We cannot turn “DirectorySlash Off” because then the default wordpress Rewriting Rules cannot work anymore and the DirectoryIndex index.php cannot be found.
    All WordPress-generated URLs don’t have the trailing slash and as they are not “real” directories they don’t get the trailing slash redirect from Apache.
    How can this be fixed?

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Wrong canonical URL with wordpress on subpath’ is closed to new replies.