Canonical URLs all show trailing slash on main site pages - using Yoast SEO for Wordpress - how to correct
-
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.
-
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/
-
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.
-
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...
-
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.
-
Gianluca - so you believe their is no reason to actually go in and fix this?
-
Hey Dave - great suggestion. I did that and it worked.
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? -
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.
-
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.
-
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!
-
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?
-
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.
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.
Related Questions
-
How do you solve this issue? Pages coming up as [No Title] in Open Site Explorer
I see this when researching top pages. I know for a fact that the pages have title tags that appear to be fine on google and our site, so I'm not sure what the [No Titlle] means or why it's appearing in Open Site Explorer. Thanks!
Moz Pro | | JasonBilog0 -
Why does Rel Canonical show up as a notice?
In the crawl diagnostics screen "Rel Canonical" shows up as a notice for every page that has a rel="canonical" meta tag in it. Why is this the case? Shouldn't every page have a canonical tag on it to show the absolute URL to the content? Wouldn't a better notice be to display pages that do not have a canonical tag instead? I could be wrong but that would make more sense to me. (In fact.. let's be honest here.. I probably am wrong.. but I'd like someone to explain it if they could.) Thanks
Moz Pro | | rrolfe1 -
Too Many On-Page Links
The SeoMoz site crawler says all my pages have too many links. I am using Dreamweaver with a horizontal Spry drop-down menu bar. My site has several hundred pages and about 100 of them show up in this Spry menu bar. I believe that this would be considered a false positive for too many links - am I right? Or is Google seeing this also as too many links per page? I am trying to get my Google rankings back after being hurt badly by the Penguin. I am using php but don't see another way to do the site links without going to a CMS type site. Thanks for any help you can give.
Moz Pro | | johnsearles0 -
How exactly can I measure SEO - the correct way?
Hi, A very challenging questions I always ask myself is that how exactly do I measure SEO. I am writing content, building pages, correcting links and so on. So now how I measure as to what I am doing is this really working out for me? Are the content which I am building is it working for the benefit of my website etc. What tools can I use to measure SEO specifically. What factors should I look at to measure when in cases where I am just begun my seo strategy. Could anyone highlight the correct tools and where inside these tools or which features inside those tools could give me good measures of the SEO Implementation. Thanks
Moz Pro | | shanky10 -
No data showing in SiteExplorer
For this site: www.cooperator.biz/ I see no backlinks in SEO Moz Open SiteExplorer but Majestic SEO is showing 13 unique domains linking to it. I regularly encounter zero data for sites that I know have backlinks, why is this? If it's a problem with crawling them, why would I continue to use SEO Moz when other SEO services are showing me links? Kind regards, Rich
Moz Pro | | Boogaloodoood0 -
What tools should i use to research the following site
Hi i am researching the following site http://www.telegraph.co.uk/travel/ and i would like to know what keywords they are using to gain traffic and i would like to know what tools i need to use to research how they are achieving great success with google. i am new to the semoz tools so i would like help in using them to study this site and other sites, can anyone please let me know what i need to do and what tools i need to use to research this site and find the links to the site and how they are achieving great success many thanks
Moz Pro | | ClaireH-1848861 -
It won't let me print the secon or third pages of site errors.
When I place the site errors page in pdf format it won't let me print the second or any of the other webpages containing content about my site. Does any one know why?
Moz Pro | | ibex0 -
How do I find the most linked to page of a site?
I'm looking at a site for a potential link and am trying to find the most linked to page. The SEOmoz toolbar tells me the root domain (DA) is linked to by 660 root domains but the main URL (PA) is linked to by 38 root domains. I used open site explorer and got the same # of 38 root domains in the result. From the Top Pages tab, I clicked on the 2nd page down and the SEOmoz toolbar gives me 189 root domains linking to that page (PA). Then I ran a Linkscape report to see what that would say and I get 146 linking root domains. 1. Is this 2nd page down on OSE the most linked to page? 2. a. Is something off in these numbers?
Moz Pro | | Motava
b. How come OSE/Linkscape doesn't report the 660 root domains in the DA?0