The Moz Q&A Forum

    • Forum
    • Questions
    • My Q&A
    • Users
    • Ask the Community

    Welcome to the Q&A Forum

    Browse the forum for helpful insights and fresh discussions about all things SEO.

    1. SEO and Digital Marketing Q&A Forum
    2. Categories
    3. Moz Tools
    4. Canonical URLs all show trailing slash on main site pages - using Yoast SEO for Wordpress - how to correct

    Canonical URLs all show trailing slash on main site pages - using Yoast SEO for Wordpress - how to correct

    Moz Tools
    12 7 7.6k
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as question
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Adam_RushHour_Marketing
      Adam_RushHour_Marketing @Linda-Vassily last edited by

      Hey Linda - I appreciate that - however when I read that article - its still seemed to open to debate if this is necessary to fix or not. Are you aware of a way to have it autofixed in wordpress? The only solution I read there was either hacking Yoast SEO to remove the trailing slash - or to manually edit every single page.

      Am I over thinking this? I agreed with one poster who mentioned that Moz appears to have wanted this issue correct because their homepage shows that moz.com does not have the trailing slash in the canonical tag - nor does yoast.com.

      Odd to me then that the Yoast plugin would then add this.

      Are you aware of a way to remove it that is more effective?

      Martijn_Scheijbeler 1 Reply Last reply Reply Quote 0
      • davebuts
        davebuts last edited by

        I find it strange that this happens with Yoast as it points the canonical tag for the homepage to a 301 redirect URL. I don't think it's a big problem as search engines seem to handle it well, but it's a problem that I wouldn't expect to see in such a popular and reputable SEO plugin.

        If you use the plugin editor to remove the trailing slash you will remove the trailing slash from all pages of your site (something you may not want to do).

        If you only want to remove the trailing slash from the homepage the easiest option would be to manually add the canonical URL without the trailing slash in the Advanced tab for Yoast when editing the homepage (as Linda said above). Doing this for one page will take you 2 seconds and fix the problem!

        Adam_RushHour_Marketing 1 Reply Last reply Reply Quote 4
        • Martijn_Scheijbeler
          Martijn_Scheijbeler @Adam_RushHour_Marketing last edited by

          What you could do is set up a filter in your functions.php file to change the URL based on the homepage but that's a bit too much maybe ;-). Next to that I think it's due to the fact that some web servers set up the trailing slash by default.

          1 Reply Last reply Reply Quote 0
          • gfiorelli1
            gfiorelli1 last edited by

            Why nobody is answering that the most normal thing to do should be redirecting via .htaccess the URL with the ending trailing hash to the one without (or viceversa)?

            I mean, that's what I would do if it was just the case of the home page.

            Said that, I would not worry that much, because that is one of those exact duplication cases that Google understands and solves with no problem.

            Adam_RushHour_Marketing davebuts 2 Replies Last reply Reply Quote 2
            • Adam_RushHour_Marketing
              Adam_RushHour_Marketing @davebuts last edited by

              Hey Dave - great suggestion. I did that and it worked.

              http://note.io/1zJ8cTZ

              Doesn't it seem strange to you that Yoast, the master of SEO - automatically does this?
              Kind of makes me think that Google doesn't see the trailing slash as a different URL for the homepage.  Wouldn't their team catch this or address it?

              1 Reply Last reply Reply Quote 0
              • Adam_RushHour_Marketing
                Adam_RushHour_Marketing @gfiorelli1 last edited by

                Gianluca - so you believe their is no reason to actually go in and fix this?

                1 Reply Last reply Reply Quote 0
                • davebuts
                  davebuts @gfiorelli1 last edited by

                  Hi Gianluca,

                  He was talking about a WordPress website which, by default, already has a 301 redirect in place on the homepage URL with the slash to the URL without the slash.

                  What's strange is that the Yoast SEO plugin points the homepage canonical tag to the URL with the slash - which is 301 redirected to the URL without!

                  I know search engines handle this very well and probably just ignore the canonical tag, but if you want it to be 100% correct (and why wouldn't you?) adding a the canonical tag in the Advanced tab is a very easy fix.

                  Adam_RushHour_Marketing 1 Reply Last reply Reply Quote 1
                  • Adam_RushHour_Marketing
                    Adam_RushHour_Marketing @davebuts last edited by

                    I wrote to Yoast about this issue but they wouldn't respond because I am using the free plugin. I may respond and let them know about this discussion. Seems like a valid legitimate question, no?  I would love an official response...

                    1 Reply Last reply Reply Quote 0
                    • TopHandMedia
                      TopHandMedia last edited by

                      I searched high and low for how to pull this off for the Yoast plugin specifically for my homepage.  And wa-la, here was the answer in the community forum.  Thanks guys!  The advanced area in the yoast plugin for the homepage did the track.   Just the homepage is set now to mywebsite.com  instead of mewebsite.com/    Too me this is cleaner for SEO and local search SEO since all citations and inbound links are pointing to mywebsite.com  NOT  mywebsite.com/   Maybe Google will shine a bit more SERP love on me.   🙂  We shall see - better make an annotation not in Google analytics so I can reference if positive impact occurred.

                      1 Reply Last reply Reply Quote 0
                      • JohnMorabito
                        JohnMorabito last edited by

                        As far as I understand this, to your browser and to Google, they're the same page (this really seems to only apply to the homepage, other pages "/" really matters a lot).

                        I would not worry about changing the canonical, in fact it's technically the 'right" location of the page. When it comes to the HTTP docs, a request to the root needs "/". All modern web browsers add it back in for you even if it's not there. This is I believe why the canonical is set as it is there in yoast.

                        I covered this in a blog as someone asked this at Pubcon this year in a keynote.

                        http://www.winstondigitalmarketing.com/yoast-homepage-canonical-correct-include-trailing-slash/

                        1 Reply Last reply Reply Quote 0
                        • 1 / 1
                        • First post
                          Last post
                        • How do I combat title tag issues in Moz because of long company/site name? [Currently using Yoast SEO Plugin]
                          4RS_John
                          4RS_John
                          0
                          15
                          770

                        • Is www.domain.com/page the same url as www.domain.com/page/ for Google? (extra slash at end of url)
                          danatanseo
                          danatanseo
                          0
                          5
                          205

                        • Should I use canonical tag on my site?
                          NateStewart
                          NateStewart
                          0
                          11
                          210

                        • Open Site Explorer is showing "No Data" for my page titles under the "Top Pages" Tab
                          OlegKorneitchouk
                          OlegKorneitchouk
                          0
                          4
                          476

                        • Does a url with no trailing slash (/)need A special redirect to the same url with a trailing slash (/)
                          BlueprintMarketing
                          BlueprintMarketing
                          0
                          4
                          1.4k

                        • Canonical link on canonical url
                          andyjsi
                          andyjsi
                          0
                          4
                          362

                        • Top pages in open site explorer showing my old site pages.
                          DesignbysoapLtd
                          DesignbysoapLtd
                          0
                          3
                          493

                        • SEOMOZ Canonical notices using Wordpress
                          CraigAddyman
                          CraigAddyman
                          0
                          2
                          740

                        Get started with Moz Pro!

                        Unlock the power of advanced SEO tools and data-driven insights.

                        Start my free trial
                        Products
                        • Moz Pro
                        • Moz Local
                        • Moz API
                        • Moz Data
                        • STAT
                        • Product Updates
                        Moz Solutions
                        • SMB Solutions
                        • Agency Solutions
                        • Enterprise Solutions
                        • Digital Marketers
                        Free SEO Tools
                        • Domain Authority Checker
                        • Link Explorer
                        • Keyword Explorer
                        • Competitive Research
                        • Brand Authority Checker
                        • Local Citation Checker
                        • MozBar Extension
                        • MozCast
                        Resources
                        • Blog
                        • SEO Learning Center
                        • Help Hub
                        • Beginner's Guide to SEO
                        • How-to Guides
                        • Moz Academy
                        • API Docs
                        About Moz
                        • About
                        • Team
                        • Careers
                        • Contact
                        Why Moz
                        • Case Studies
                        • Testimonials
                        Get Involved
                        • Become an Affiliate
                        • MozCon
                        • Webinars
                        • Practical Marketer Series
                        • MozPod
                        Connect with us

                        Contact the Help team

                        Join our newsletter
                        Moz logo
                        © 2021 - 2026 SEOMoz, Inc., a Ziff Davis company. All rights reserved. Moz is a registered trademark of SEOMoz, Inc.
                        • Accessibility
                        • Terms of Use
                        • Privacy