• Resolved catalanos

    (@catalanos)


    Hello,

    I have a problem with YOAST. When is active, a double slash is added to the domain name, or in the middle of the url, after the domain name.

    The sitemaps are OK, the urls are correct in this section. When I deactivate the plugin, the double slash from the url disappear, so is something related to YOAST.

    Can you take a look? Thank you!

    • This topic was modified 1 year ago by catalanos.

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

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Support Maybellyne

    (@maybellyne)

    Hello @catalanos

    Thanks for reaching out about your canonical URLs. Please share a screenshot of what you have as your WordPress Address (URL) & Site Address (URL) in WordPress > Settings > General.

    Thread Starter catalanos

    (@catalanos)

    Hello,

    This is the screenshot: https://prnt.sc/Srp5wHxhUqQy

    I updated the functions.php / wp-config.php, and I added the domain name there, to make sure that everything is correct. Thank you!

    Plugin Support Maybellyne

    (@maybellyne)

    Can also share a screenshot of the update you made to your functions.php and wp-config.php? Was this done before you started noticing the double trailing slashes?

    • This reply was modified 1 year ago by Maybellyne.
    Thread Starter catalanos

    (@catalanos)

    I added in wp-config.php

    https://prnt.sc/flZ_-SAQsOTi

    This is in functions.php

    https://prnt.sc/E9wrnhahetaP

    I added these codes after I saw the canonical problem to make sure the domain name is correctly defined.

    • This reply was modified 1 year ago by catalanos.
    Plugin Support Maybellyne

    (@maybellyne)

    Thanks for the helpful screenshots. Please use this code to remove the trailing slash from the Yoast SEO canonical output.

    Typically code snippets are added to your theme’s functions.php file. If you’re unfamiliar with using code snippets, we’d like to refer you to the WordPress documentation on how to use a filter.

    Thread Starter catalanos

    (@catalanos)

    Hello,
    It works only for homepage. 🙁

    Thread Starter catalanos

    (@catalanos)

    I removed the canonical line generated by YOAST using a code from your example page. I installed a dedicated plugin for canonical.

    I use your plugin since 2014, but I am disappointed by YOAST after this experience.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Wrong canonical – two slashes at the end / in the middle of the url’ is closed to new replies.