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.
Got a burning SEO question?
Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.
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
-
I have used my keyword only 12 times but on-page grader shows it 40 times?
Hey experts, I hope you are doing great, kindly have a look at this page, my keyword for this page is "Sports Streaming Sites". The text has a length of 5344 words and I'm using my keyword in this post as follow: 1. Text Body: 12 times(including headers)
Moz Pro | | louisaclark1
2. Alt tags: 10 times (20+ Images)
3. Title: 1 Time
4. Description: 1 Time
5. Permalink: 1 Time This is a total of 25 times in 5344 words, but when I check this page with moz on-page grader, it shows that I'm using this keyword 40 times and its stuffed, can anybody please explain it to me, I'm so confused and it'll be so nice of you. Here is the on-page grader report page: https://analytics.moz.com/pro/research/page-grader?keyword=Sports%20Streaming%20Sites&url=https%3A%2F%2Firiveramerica.com%2Ffree-best-sports-streaming-sites%2F0 -
Exact Keyword is Used in Page Title & Exact Keyword Used in Document Text at Least Once
Hi Folks, I have a page https://purplegriffon.com/courses/itil-training/itil-foundation-training/itil-foundation that grades with the 'On-Page Grader' as a B grade for the keyword 'itil foundation' but reports that there is no 'Exact Keyword is Used in Page Title' and 'Exact Keyword Used in Document Text at Least Once'. The thing is, it actually is but because of IP (intellectual property) rights we have to include a '®' (®) symbol when we mention the course title 'ITIL® Foundation'. Now I believe Google is smart enough to recognise that this symbol should not be included but it seems that for the specific criteria mentioned above, the MOZ bot isn't smart enough to recognise this, even though it recognises the keyword usage elsewhere. So my question is this. Would this constitute an issue in terms of ranking? Another question I have, is how significant are the gains with shorter URL's? For example, the URL to the page in question is: https://purplegriffon.com/courses/itil-training/itil-foundation-training/itil-foundation Would a URL such as below have a significant effect on SEO?: https://purplegriffon.com/courses/itil-foundation Thanks for your feedback.
Moz Pro | | PurpleGriffon0 -
Moz shows an F grade and 0 keywords on a previously high ranking page - Please help
Hi all, Moz is showing an F grade and 0 keywords across all URL, Title, Meta, H1, Meta and IMG ALT. My page has also dropped from 1st page rankings for numerous pages to 2nd and 3rd page. The page I am talking about is: http://year13.com.au/10-highest-paying-jobs-you-can-get-without-a-degree/ The keywords/phrases we were previously ranking very well for are: High paying jobs in Australia High paying jobs Highest paying jobs you can get with no degree Etc Etc I have also seen reduction in rankings on other keywords/ pages as well. Does anyone know why this might have happened? And what might be happening? Thanks in advance!
Moz Pro | | Stubs0 -
On-Page Report Card B grade because its a PPC landing page
I have a PPC landing page with I'm getting a B grade on the On-Page Report Card. Can I just ignore that, it says its a "Critical Factor" Thanks Mike Crawl status <dd>Status Code: 200
Moz Pro | | mjrinvent
meta-robots: noindex,nofollowall
meta-refresh: None
X-Robots: None</dd> <dt>Explanation</dt> <dd>Pages that can't be crawled or indexed have no opportunity to rank in the results. Before tweaking keyword targeting or leveraging other optimization techniques, it's essential to make sure this page is accessible.</dd> <dt>Recommendation</dt> <dd>Ensure the URL returns the HTTP code 200 and is not blocked with robots.txt, meta robots or x-robots protocol (and does not meta refresh to another URL)</dd>0 -
SEOMOZ Crawling Our Site
Hi there, We get a report from SEOMOZ every week which shows our performance within search. I noticed for our website www.unifor.com.au that it looks through over 10,000 pages, however our website sells less than 500 products so not sure why or how so many pages are trawled? If someone could let me know that would be great. It uses up a lot of bandwidth doing each of these searches so if the amount of pages being trawled reduced it would definitely assist. Thanks, Geoff
Moz Pro | | BeerCartel750 -
How can I get a report of the top 500 national sites using Domain Authority and Page Authority? Does someone have to type sites in one by one on Site Explorer or is there another way?
I want to know what sites and blogs have the to rankings overall based on their Domain Authority and Page Authority - Top 500 - 1000 in nation - I want to know which ones are follow and no-follow too - Does anyone know? Has anyone run such a report yet? Thanks for help - BD
Moz Pro | | creativeguy0 -
Ranking Tracker not correct?
Over the last 6 weeks I've been linkbuilding for one of my customers. The search term is: bed and breakfast portugal. It is not easy but we are making progress. The goal is the number 1 page (top 10 results) in Google.nl I've been keeping score with Rank Tracker and also created a campaign. Last week we were still ranked 11 (for some time already) according to Rank Tracker but tuesday we made a jump to number 7. Whoehoe you would say but opening up Chrome and Firefox browser I am still seeing www.bedandbreakfast-casaceedina.com on the 2nd page? Maybe somebody can give me an explanation? I've de-personalized my search and also Rank tracker show s the command they are using: http://www.google.nl/search?q=bed+and+breakfast+portugal&pws=0 However also using that I'm not seeing my client back at position 7. How can the Rank tracker information be so wrong, I was hoping not off course 🙂 Your help is appreciated very much.
Moz Pro | | newtraffic0 -
My Campaign just picked up the .com.au site and is showing data
I've got a campaign set up here in SEOmoz and it appears that it just started picking up data for a site that is not mine. Our site is examplesite.com and i noticed that SEOmoz has begun including examplesite.com.au and is showing 20,000 302's from this site. The .com.au site is in no way related to our business and should not be tracked in our campaign. Has this happened to anyone else?
Moz Pro | | WP_SEO0