• Resolved Elodie

    (@azurwebdesign)


    When we generate SEO reports, the SEO crawler detects some pages as having the trailing slash and others not, but only on some of our pages.
    All our pages have a trailing slash.
    But we don’t understand why 301 redirects are done on the one that doesn’t.

    https://example.com/hello/
    https://example.com/hello

    The difference is the trailing slash. He sort of thinks that there are 2 “different” pages – with exactly the same content – and then we are penalized.

    This usually means that there is a link, or structured data information, somewhere with the address “example.com/hello”, with a slash at the end. I have now looked at the html output of every page on one of our sites, and there is no mention of the address with the trailing slash anywhere …

    I’m starting to think maybe it’s a problem with the .htaccess file? Or maybe somewhere else? ..

    We are multisite so the .htaccess is tricky
    Any suggestion would be welcome!

Viewing 4 replies - 1 through 4 (of 4 total)
  • Moderator bcworkz

    (@bcworkz)

    All WP permalinks should have a trailing slash because they don’t lead to actual files. As long as a “duplicate” URL’s canonical link is the same as the proper page, there’s not supposed to be a same content penalty. Plus 301 redirecting the non-slashed URL means the requested URL requires updating, hence it’s not duplicate since no one ever sees the original requested content, it’s that of the redirect target.

    All code using variants of get_permalink() should have trailing slashes. Permalinks are filterable, so if the trailing slash is missing, some theme or plugin code is altering get_permalink() return values. If a site has all plugins deactivated and uses one of the default twenty* themes, all permalinks should have trailing slashes.

    Thread Starter Elodie

    (@azurwebdesign)

    Hello,
    Thank you for your answer,
    But if the 2 urls both send code 200, is there a problem? Should it be redirected to 301 ?
    So you think it could come from a plugin that changes the value of slash urls ?

    Moderator bcworkz

    (@bcworkz)

    As long as the canonical meta tag for both URLs are identical there’s not supposed to be any SEO penalty for duplicate content. In any case, all WP sites I’ve been involved with do a 301 redirect from non-trailing slashed URL to trailing slashed URL. Any behavior otherwise is almost certainly due to plugin or theme influence. As a wild guess, perhaps some SEO plugin decided behavior different from default confers some advantage. But IMO a 301 redirect is the correct and most appropriate response to a non-trailing slash request.

    Thread Starter Elodie

    (@azurwebdesign)

    THANKS !
    ??

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Probleme trailing slash multisite wordpress’ is closed to new replies.