undefined
Skip to content
Moz logo Menu open Menu close
  • Products
    • Moz Pro
    • Moz Pro Home
    • Moz Local
    • Moz Local Home
    • STAT
    • Moz API
    • Moz API Home
    • Compare SEO Products
    • Moz Data
  • Free SEO Tools
    • Domain Analysis
    • Keyword Explorer
    • Link Explorer
    • Competitive Research
    • MozBar
    • More Free SEO Tools
  • Learn SEO
    • Beginner's Guide to SEO
    • SEO Learning Center
    • Moz Academy
    • SEO Q&A
    • Webinars, Whitepapers, & Guides
  • Blog
  • Why Moz
    • Agency Solutions
    • Enterprise Solutions
    • Small Business Solutions
    • Case Studies
    • The Moz Story
    • New Releases
  • Log in
  • Log out
  • Products
    • Moz Pro

      Your all-in-one suite of SEO essentials.

    • Moz Local

      Raise your local SEO visibility with complete local SEO management.

    • STAT

      SERP tracking and analytics for enterprise SEO experts.

    • Moz API

      Power your SEO with our index of over 44 trillion links.

    • Compare SEO Products

      See which Moz SEO solution best meets your business needs.

    • Moz Data

      Power your SEO strategy & AI models with custom data solutions.

    NEW Keyword Suggestions by Topic
    Moz Pro

    NEW Keyword Suggestions by Topic

    Learn more
  • Free SEO Tools
    • Domain Analysis

      Get top competitive SEO metrics like DA, top pages and more.

    • Keyword Explorer

      Find traffic-driving keywords with our 1.25 billion+ keyword index.

    • Link Explorer

      Explore over 40 trillion links for powerful backlink data.

    • Competitive Research

      Uncover valuable insights on your organic search competitors.

    • MozBar

      See top SEO metrics for free as you browse the web.

    • More Free SEO Tools

      Explore all the free SEO tools Moz has to offer.

    NEW Keyword Suggestions by Topic
    Moz Pro

    NEW Keyword Suggestions by Topic

    Learn more
  • Learn SEO
    • Beginner's Guide to SEO

      The #1 most popular introduction to SEO, trusted by millions.

    • SEO Learning Center

      Broaden your knowledge with SEO resources for all skill levels.

    • On-Demand Webinars

      Learn modern SEO best practices from industry experts.

    • How-To Guides

      Step-by-step guides to search success from the authority on SEO.

    • Moz Academy

      Upskill and get certified with on-demand courses & certifications.

    • MozCon

      Save on Early Bird tickets and join us in London or New York City

    Unlock flexible pricing & new endpoints
    Moz API

    Unlock flexible pricing & new endpoints

    Find your plan
  • Blog
  • Why Moz
    • Small Business Solutions

      Uncover insights to make smarter marketing decisions in less time.

    • Agency Solutions

      Earn & keep valuable clients with unparalleled data & insights.

    • Enterprise Solutions

      Gain a competitive edge in the ever-changing world of search.

    • The Moz Story

      Moz was the first & remains the most trusted SEO company.

    • Case Studies

      Explore how Moz drives ROI with a proven track record of success.

    • New Releases

      Get the scoop on the latest and greatest from Moz.

    Surface actionable competitive intel
    New Feature

    Surface actionable competitive intel

    Learn More
  • Log in
    • Moz Pro
    • Moz Local
    • Moz Local Dashboard
    • Moz API
    • Moz API Dashboard
    • Moz Academy
  • Avatar
    • Moz Home
    • Notifications
    • Account & Billing
    • Manage Users
    • Community Profile
    • My Q&A
    • My Videos
    • Log Out

The Moz Q&A Forum

  • Forum
  • Questions
  • Users
  • Ask the Community

Welcome to the Q&A Forum

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

  1. Home
  2. Moz Tools
  3. Moz Pro
  4. Canonical URLs all show trailing slash on main site pages - using Yoast SEO for Wordpress - how to correct

Moz Q&A is closed.

After more than 13 years, and tens of thousands of questions, Moz Q&A closed on 12th December 2024. Whilst we’re not completely removing the content - many posts will still be possible to view - we have locked both new posts and new replies. More details here.

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

Moz Pro
7
12
10.2k
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as question
Log in to reply
This topic has been deleted. Only users with question management privileges can see it.
  • Adam_RushHour_Marketing
    Adam_RushHour_Marketing last edited by Jan 1, 2015, 9:49 PM

    We are using Yoast for a number of our sites.  We use naked domain as the canonical. I have noticed in the header tags that all our sites show the canonical URLs as having a trailing slash:

    Example:   http;//foxspizzajc.com, when I look at the source code, it shows the canonical as http;//foxspizzajc.com/

    Of course, it is much more likely that all sites that link to us will not use the trailing slash - so preferably we do not want that to be the canonical - among other reasons.

    Does this need to be fixed so the trailing slash is removed? I cannot see how to do this in Yoast SEO or in Permalinks structure for Wordpress.

    Sorry for my ignorance.

    Thanks for any help.

    1 Reply Last reply Reply Quote 1
    • JohnMorabito
      JohnMorabito Subscriber last edited by Dec 3, 2017, 11:10 PM Dec 3, 2017, 11:09 PM

      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
      • topic:timeago_earlier,3 years
      • TopHandMedia
        TopHandMedia last edited by Jan 29, 2015, 9:25 PM Jan 29, 2015, 9:25 PM

        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
        • topic:timeago_earlier,27 days
        • Adam_RushHour_Marketing
          Adam_RushHour_Marketing @davebuts last edited by Jan 2, 2015, 10:17 PM Jan 2, 2015, 10:17 PM

          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
          • davebuts
            davebuts @gfiorelli1 last edited by Jan 2, 2015, 10:16 PM Jan 2, 2015, 8:41 PM

            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 Jan 2, 2015, 10:17 PM Reply Quote 1
            • Adam_RushHour_Marketing
              Adam_RushHour_Marketing @gfiorelli1 last edited by Jan 2, 2015, 4:25 PM Jan 2, 2015, 4:25 PM

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

              1 Reply Last reply Reply Quote 0
              • Adam_RushHour_Marketing
                Adam_RushHour_Marketing @davebuts last edited by Jan 2, 2015, 4:24 PM Jan 2, 2015, 4:24 PM

                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
                • gfiorelli1
                  gfiorelli1 last edited by Jan 2, 2015, 3:53 PM Jan 2, 2015, 3:53 PM

                  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 Jan 2, 2015, 8:41 PM Reply Quote 2
                  • Martijn_Scheijbeler
                    Martijn_Scheijbeler @Adam_RushHour_Marketing last edited by Jan 2, 2015, 6:01 AM Jan 2, 2015, 6:01 AM

                    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
                    • davebuts
                      davebuts last edited by Jan 2, 2015, 10:27 PM Jan 2, 2015, 4:46 AM

                      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 Jan 2, 2015, 4:24 PM Reply Quote 4
                      • Adam_RushHour_Marketing
                        Adam_RushHour_Marketing @Linda-Vassily last edited by Jan 2, 2015, 2:52 AM Jan 2, 2015, 2:52 AM

                        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 Jan 2, 2015, 6:01 AM Reply Quote 0
                        • Linda-Vassily
                          Linda-Vassily last edited by Jan 2, 2015, 12:49 AM Jan 2, 2015, 12:49 AM

                          A similar question has been asked here before: http://moz.com/community/q/how-do-i-get-rel-canonical-to-eliminate-the-trailing-slash-on-my-home-page .

                          "Login to your WordPress backend as an administrator and look for "Plugins" on the left menu and go to "Editor" within the plugins menu."

                          You can also edit the canonicals of individual pages and posts under the "Advanced" tab on the individual page or post editing page.

                          Adam_RushHour_Marketing 1 Reply Last reply Jan 2, 2015, 2:52 AM Reply Quote 0
                          • 1 / 1
                          1 out of 12
                          • First post
                            1/12
                            Last post

                          Got a burning SEO question?

                          Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.


                          Start my free trial


                          Browse Questions

                          Explore more categories

                          • Moz Tools

                            Chat with the community about the Moz tools.

                          • SEO Tactics

                            Discuss the SEO process with fellow marketers

                          • Community

                            Discuss industry events, jobs, and news!

                          • Digital Marketing

                            Chat about tactics outside of SEO

                          • Research & Trends

                            Dive into research and trends in the search industry.

                          • Support

                            Connect on product support and feature requests.

                          • See all categories

                          Related Questions

                          • NichGunn

                            Should I set blog category/tag pages as "noindex"? If so, how do I prevent "meta noindex" Moz crawl errors for those pages?

                            From what I can tell, SEO experts recommend setting blog category and tag pages (ie. "http://site.com/blog/tag/some-product") as "noindex, follow" in order to keep the page quality of indexable pages high. However, I just received a slew of critical crawl warnings from Moz for having these pages set to "noindex." Should the pages be indexed? If not, why am I receiving critical crawl warnings from Moz and how do I prevent this?

                            Moz Pro | Nov 22, 2017, 11:13 AM | NichGunn
                            0
                          • xeonet32

                            Youtube traffic page url referral

                            Hello, How can I see which videos from Youtube that has my domain inserted in their description url drive traffic to my domain? I can see in GA how many visitors are coming from Youtube to my domain, but I can't see what Youtube video pages has driven traffic. Any help?

                            Moz Pro | Jan 28, 2016, 6:50 PM | xeonet32
                            0
                          • scienceisrad

                            What to do with a site of >50,000 pages vs. crawl limit?

                            What happens if you have a site in your Moz Pro campaign that has more than 50,000 pages? Would it be better to choose a sub-folder of the site to get a thorough look at that sub-folder? I have a few different large government websites that I'm tracking to see how they are fairing in rankings and SEO.  They are not my own websites.  I want to see how these agencies are doing compared to what the public searches for on technical topics and social issues that the agencies manage.  I'm an academic looking at science communication.  I am in the process of re-setting up my campaigns to get better data than I have been getting -- I am a newbie to SEO and the campaigns I slapped together a few months ago need to be set up better, such as all on the same day, making sure I've set it to include www or not for what ranks, refining my keywords, etc. I am stumped on what to do about the agency websites being really huge, and what all the options are to get good data in light of the 50,000 page crawl limit.  Here is an example of what I mean: To see how EPA is doing in searches related to air quality, ideally I'd track all of EPA's web presence. www.epa.gov has 560,000 pages -- if I put in www.epa.gov for a campaign, what happens with the site having so many more pages than the 50,000 crawl limit?  What do I miss out on?  Can I "trust" what I get? www.epa.gov/air has only 1450 pages, so if I choose this for what I track in a campaign, the crawl will cover that subfolder completely, and I am getting a complete picture of this air-focused sub-folder ... but (1) I'll miss out on air-related pages in other sub-folders of www.epa.gov, and (2) it seems like I have so much of the 50,000-page crawl limit that I'm not using and could be using.  (However, maybe that's not quite true - I'd also be tracking other sites as competitors - e.g. non-profits that advocate in air quality, industry air quality sites - and maybe those competitors count towards the 50,000-page crawl limit and would get me up to the limit? How do the competitors you choose figure into the crawl limit?) Any opinions on which I should do in general on this kind of situation?  The small sub-folder vs. the full humongous site vs. is there some other way to go here that I'm not thinking of?

                            Moz Pro | Jul 22, 2015, 4:26 PM | scienceisrad
                            0
                          • hsma

                            How to remove broken links from our wordpress site?

                            Hello! How are you? We just signed up to Moz.com. Moz link tool. It gave us many broken links with 404's and 302's. Could you please help me with deleting the links? Thanks!

                            Moz Pro | Dec 11, 2020, 1:06 PM | hsma
                            0
                          • Issuer_Direct

                            How to track data from old site and new site with the same URL?

                            We are launching a new site within the next 48 hours.  We have already purchased the 30 day trial and we will continue to use this tool once the new site is launched. Just looking for some tips and/or best practices so we can compare the old data vs. the new data moving forward....thank you in advance for your response(s). PB3

                            Moz Pro | Feb 19, 2014, 12:22 PM | Issuer_Direct
                            0
                          • twelvetwo.net

                            Moz WordPress Plugin?

                            WordPress is currently 18% of the Internet.  Given its huge footprint, wouldn't it make sense for Moz to develop a WP plugin that can not only report site metrics, but help fix and optimize site structure directly from within the site? Just curious - I can't be the only one who wonders if I'm implementing Moz findings/recommendations correctly given the myriad of WP SEO plugins, authors, implementations.

                            Moz Pro | Mar 26, 2021, 7:45 PM | twelvetwo.net
                            5
                          • jonny512379

                            Site Explorer - No Data Available for this URL

                            Hi All I have just joined on the trial offer, im not sure if i can afford the monthly payments, but im hoping SEOmoz will show me that i also cannot afford to be without it! In my proses of learning this site and flicking through each section to see what things do. However when i enter my URL into Site Explorer i get the following message "No Data Available for this URL" My site should be crawl-able, so how do i get to see data for my site/s. I wont post my URL here, as the site has a slightly adult theme.
                            If anyone could confirm if i can post "slightly adult" sites. Best Regards
                            Jon

                            Moz Pro | Nov 15, 2012, 5:35 PM | jonny512379
                            0
                          • Mionkeybot

                            Is there a way to see what keywords users of my site are using to find it online?

                            Since Google Analytics no longer shows the keywords used by people to find a site online, does the SEOMoz toolset provide somethng to show this data?

                            Moz Pro | Dec 2, 2016, 12:15 PM | Mionkeybot
                            0

                          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
                          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 - 2025 SEOMoz, Inc., a Ziff Davis company. All rights reserved. Moz is a registered trademark of SEOMoz, Inc.
                          • Accessibility
                          • Terms of Use
                          • Privacy

                          Looks like your connection to Moz was lost, please wait while we try to reconnect.