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
-
Unsolved On page grader
All of my keywords score a 53 using the on page grader. When I look at the notes it indicates I don't have the keyword in question anywhere on the page which, while true in some cases, is not always factual. Does anyone have a similar experience?
Moz Pro | | josayoun0 -
Filter Pages
Howdy Moz Forum!! I have a headache of a job over here in the UK and I'd welcome any advice! - It's sunny today, only 1 of 5 days in a year and i'm stuck on this! I have a client that currently has 22,000 pages indexed to Google with almost 4000 showing as duplicate content. The site has a "jobs" and "candidates" list. This can cause all sorts of variations such as job title, language, location etc. The filter pages all seem to be indexed. Plus the static pages are indexed. For example if there were 100 jobs at Moz being advertised, it is displaying the jobs on the following URL structure - /moz
Moz Pro | | Slumberjac
/moz/moz-jobs
/moz/moz-jobs/page/2
/moz/moz-jobs/page/3
/moz/moz-jobs/page/4
/moz/moz-jobs/page/5 ETC ETC Imagine this with some going up to page/250 I have checked GA data and can see that although there are tons of pages indexed this way, non of them past the "/moz/moz-jobs" URL get any sort of organic traffic. So, my first question! - Should I use rel-canonical tags on all the /page/2 & /page/3 etc results and point them all at the /moz/moz-jobs parent page?? The reason for this is these pages have the same title and content and fall very close to "duplicate" content even though it does pull in different jobs... I hope i'm making sense? There is also a lot of pages indexed in a way such as- https://www.examplesite.co.uk/moz-jobs/search/page/9/?candidate_search_type=seo-consulant&candidate_search_language=blank-language These are filter pages... and as far as I'm concerned shouldn't really be indexed? Second question! - Should I "no follow" everything after /page in this instance? To keep things tidy? I don't want all the variations indexed! Any help or general thoughts would be much appreciated! Thanks.0 -
Duplicate Site Content found in Moz; Have a URL Parameter set in Google Webmaster Tools
Hey, So on our site we have a Buyer's Guide that we made. Essentially it is a pop-up with a series of questions that then recommends a product. The parameter ?openguide=true can be used on any url on our site to pull this buyer's guide up. Somehow the Moz Site Crawl reported each one of our pages as duplicate content as it added this string (?openguide=true) to each page. We already have a URL Parameter set in Google Webmaster Tools as openguide ; however, I am now worried that google might be seeing this duplicate content as well. I have checked all of the pages with duplicate title tags in the Webmaster Tools to see if that could give me an answer as to whether it is detecting duplicate content. I did not find any duplicate title tag pages that were because of the openguide parameter. I am just wondering if anyone knows:
Moz Pro | | MitchellChapman
1. a way to check if google is seeing it as duplicate content
2. make sure that the parameter is set correctly in webmaster tools
3. or a better way to prevent the crawler from thinking this is duplicate content Any help is appreciated! Thanks, Mitchell Chapman
www.kontrolfreek.com0 -
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 -
The keyword ranking report takes into account all my website urls? Can I specify the URLs where I want to track the keywords?
I don't know if my weekly reports are reporting the ranking of my keywords correctly. I have added some new keywords, since that all my reports are in red numbers. I don't know if this is happening because I did something wrong, or if is because my rankings are really falling down.
Moz Pro | | hockerty0 -
Dead links-urls
What is the quickest way to get Google to clean up dead
Moz Pro | | 1step2heaven
link? I have 74,000 dead links reported back, i have added a robot txt to
disallow and added on Google list remove from my webmaster tool 4 months ago.
The same dead links also show on the open site explores. Thanks0 -
My campaigns are not analyzing all my pages.
Hi I created a campaign against http://www.universalpr.com, and this campaign reports that only one page has been crawled. This site uses a jsvascript redirect to the real page which can be found through the following: www.universalpr.com/wps/portal/universal/univhome/!ut/p/c5/04_SB8K8xLLM9MSSzPy8xBz9CP0os_hQdwtfCydDRwN_Jw9LA0-LAOPQYCdDI_9QY_1wkA6zeAMcwNFA388jPzdVPzi1WL8gO68cANNcdLU!/dl3/d3/L2dBISEvZ0FBIS9nQSEh/ Now I also attempted to create a campaign against this page in case that the javascript redirect was breaking things, but that campaign also reported 1 page crawled. Can anyone instruct me as to what I'm doing wrong? Thank you
Moz Pro | | jcmoreno0 -
Why is Open site Explorer showing: No Data Available for this URL
Hi there, Im having a few problems getting my site www.incarmotorfactors.co.uk up and running on SEOMoz and im not sure what im doing wrong.Firstly seomoz shows 2 links for my site... Which is wrong. Google shows alot more. However the most noticable problem so far is Opensite explorer. When i type in the web address it shows "No Data Available for this URL" The site is more then a year old and has a few links, can anybody tell me what the problem may be?
Moz Pro | | Ev840