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
-
Someone has purchased super similar domain to mine will this effect my site seo overall?
I have a domain name allready registered www.untamedelopement.co.uk and dot com. Someone despite knowing I had this name has registered untamedelopements.com (with the s) is that going to mess up my seo. I'm UK and will be targeting as my keyword Scottish Wedding Photographer and they are Canada? Thanks in advance
Moz Pro | | hemeravisuals130 -
Site Not On Google, SEOmoz shows as 43
The site I'm helping with was at one time a page 1, even #1 on page 1. Lots of changes, problems when someone else did something and dropped to page 4 for keyword. After some recent tweaking I did, it no longer shows on rankings. No penalty on Google Webmaster, in Webmaster tools it shows the sitemap processed with no errors. SEOmoz still shows it at #43 in Rankings. Why does SEOmoz see it, but I don't? Site is www.plussizeplum.com (sorry, plus size women's lingerie) and keywords are "plus size lingerie".
Moz Pro | | dlcohen0 -
Is ther any wordpress pluggin to ad a foro question like this blog or like yahoo answers to my site
Is ther any wordpress pluggin to ad a foro question like this blog or like yahoo answers to my site
Moz Pro | | maestrosonrisas0 -
Duplicate pages with canonical links still show as errors
On our CMS, there are duplicate pages such as /news, /news/, /news?page=1, /news/?page=1. From an SEO perspective, I'm not too worried, because I guess Google is pretty capable of sorting this out, but to be on the safe side, I've added canonical links. /news itself has no link, but all the other variants have links to "/news". (And if you go wild and add a bunch of random meaningless parameters, creating /news/?page=1&jim=jam&foo=bar&this=that, we will laugh at you and generate a canonical link back to "/news". We're clever like that.) So far so good. And everything appears to work fine. But SEOMoz is still flagging up errors about duplicate titles and duplicate content. If you click in, you'll see a "Note" on each error, showing that SEOMoz has found the canonical link. So SEOMoz knows the duplication isn't a problem, as we're using canonical links exactly the way they're supposed to be used, and yet is still flagging it as an error. Is this something I should be concerned about, or is it just a bug in SEOMoz?
Moz Pro | | LockyDotser0 -
So many problems with my site.
Hi all.I was shocked when when i run a campaign and the warnings and recommendations about my site are so many.I know nothing about web design and the person who design it is asking me what are these problems and where did i get all these? any solution this are the problems 1.5XX (Server Error)
Moz Pro | | jubba
2.Duplicate Page Content(875)
3.Duplicate Page Title(875)
4.Overly-Dynamic URL(1048)
5.Too Many On-Page Links(60) and this is just a few of the problems.0 -
Site Ranking Report
Hi guys, My site ranking report says that I've gone from being 1-20 for a variety of keywords in Google UK to not in the top 50. When I do a search myself I see that my site remains where it previously was (between 1-20). How reliable is the site ranking reporting on a weekly basis? Is it best to look at it monthly?
Moz Pro | | columbus0 -
How do i increae my page authority
Hi i am still finding my way around semoz and still learning what the tools do and i am trying to find out how i can increase my page authority. My competition page authority is 52 while mine is 36 and i would like to learn how i can increase mine to beat my competition. If anyone could give me some step by step instructions on what tools i should use and how i should use them to increase my page authority many thanks
Moz Pro | | ClaireH-1848860 -
What do i do when all pages are grade A?
I've used the on page grade and now have all my pages at a grade A for relevant keywords. Most of them are cool, achieveing first page rankings apart from a few massive keywords. So the question is, what's next? What do i do now that I'm at grade A, but perhaps not #1 yet... Cheers -dan
Moz Pro | | spytunes0