Only One Canonical URL Tag
-
HI, I'm an SEO novice - company owner with no money so doing it all myself with help from my web designer using wordpress. Ive just completed some seo and done the moz page scoring analysis for optimisation and gained 92% - however - there is one outstanding issue on canonical url tags - i.e.
recommened fix = The canonical URL tag is intended to refer duplicate pages to a single canonical URL. To ensure the search engines properly parse the canonical source, your page should use only one version of this tag in the header. See Canonical URL Tag - the Most Important Advancement in SEO Practices Since Sitemaps
Ive gone through the page code and can see I have 2 rel=canonical references - am I able to simply delete one - how do I do this if its been created by the yoast/wordpress plug-in?
Many thanks in advance for any help!
-
Smart move. Let me know if I can be of any more help then does this answer your question?
-
hi thomas, yes - we are keeping the yoast plug-in but switching the rss feed plug-in to a different one that will enable us to switch off the canonical ref.
-
You have an RSS feed that is adding a canonical to your own site?
RSS normally can add canonical's to third-party sites I don't think that the issue is Yoast I believe it is with the RSS post importer.
this is the second best SEO plugin you can use
https://wordpress.org/plugins/all-in-one-seo-pack/
every decent word press seo plugin will add canonical's you can choose to turn off canonical's on Yoast however I would do this using the RSS post importer
In case your are using WordPress SEO plugin, you’ll have to add a filter in the functions.php file just before the closing of PHP as shown in the screenshot below.
See
http://i.imgur.com/cr7IU4W.jpg
Here is the exact code:
add_filter( 'wpseo_canonical', '__return_false' );
It will disable canonical tags across the site and no page, no post and no archive will show this tag. But if you want to disable tagging function on certain posts, pages or category archives, you’ll have to use this code instead of the code mentioned above.
function wpseo_canonical_exclude( $canonical ) {global $post;if (is_single( '348' )) {$canonical = false;}return $canonical;}
As you know every post, page, category or any another archive has its own unique ID in the wordpress. So in the above example we used 348 which is the post ID for a specific post where the canonical tag will not show. If you don’t know how to find the ID, here is a good article for you. To hide this tag from multiple posts, use this code.
function wpseo_canonical_exclude( $canonical ) {global $post;is_single( array( 17, 19, 1, 11 ) ) {$canonical = false;}return $canonical;}
I still strongly recommend that you keep the canonical on via plug-in and not via RSS there are too many things that it could miss and cause problems for you.
I hope this helps,
Tom
-
HI Tom, thankyou very much for your help and information on this. We have now investigated where the second canonical url was coming from and we found that the plugin we use to import the daily feed (RRS Post Importer) is also adding in it’s own canonical URL (as well as the yoast seo). We are now going to look at switching in a different plug-in for this which will give us functionality to delete the rel-canonical reference, as the one we have doesn't enable you to do this.
Again, thanks for your help.
Kind regards
Matthew
-
here is a CSV file showing the pages with more than one canonical you must make it so there's only one canonical per a page
here is the CSV
Bigger photo http://i.imgur.com/cqcTN0h.png
<colgroup><col width="420"> <col width="184"> <col span="3" width="87"> <col width="199"> <col width="304"> <col span="3" width="87"></colgroup>
| Directives - Canonical | | | | | | | | | |
| Address | Occurrences | Meta Robots 1 | X-Robots-Tag 1 | Meta Refresh 1 | Canonical Link Element 1 | Canonical Link Element 2 | HTTP Canonical | rel=“next†| rel=“prev†|
| http://www.completetenders.com/services/bid-management/ | 3 | noodp | | | http://www.completetenders.com/services/bid-management/ | http://www.completetenders.com/services/bid-management/ | | | |
| http://www.completetenders.com/ | 2 | noodp | | | http://www.completetenders.com/ | | | | |
| http://www.completetenders.com/services/tendering-process/ | 3 | noodp | | | http://www.completetenders.com/services/tendering-process/ | http://www.completetenders.com/services/tendering-process/ | | | |
| http://www.completetenders.com/services/tender-writing/ | 3 | noodp | | | http://www.completetenders.com/services/tender-writing/ | http://www.completetenders.com/services/tender-writing/ | | | |
| http://www.completetenders.com/open-tenders/ | 2 | noodp | | | http://www.completetenders.com/open-tenders/ | | | | |all the best,
Tom
-
I just checked the URL you referenced you have duplicate canonical tags I checked it using screamingfrog.co.uk/seo-spider/
please look at the data below.
You need to remove one of them you should only have one.
so instead of this
- Canonical Link Element 1 http://www.completetenders.com/services/bid-management/
- Canonical Link Element 2 http://www.completetenders.com/services/bid-management/
you get
- Canonical Link Element 1 http://www.completetenders.com/services/bid-management/
See
URL Encoded Address http://www.completetenders.com/services/bid-management/
Content text/html; charset=UTF-8
Status Code 200
Status OK
Size 150645
Title 1 Bid Management / End-to-end Tendering Support
Meta Description 1 Professional Bid Management Consultants / Bid Solutions to Win Contracts / Everything You Need / Expert Advice on 07429 191305
H1-1 Bid Management
H2-1 Bid Management
H2-2 View More
Meta Robots 1 noodp
Canonical Link Element 1 http://www.completetenders.com/services/bid-management/
Canonical Link Element 2 http://www.completetenders.com/services/bid-management/
Word Count 723
Level 0
Inlinks 14
Outlinks 23 -
Look at your source code on these pages use command-F (on Mac) or control F (on PC) to search for the term "canonical" if you do not see it more than once on the page it should be no issue.
"the only difference I can see is the first one uses '...' and the second one uses "..."
The canonical link? If there are two canonical bags on the same page make sure to remove the one that is not pointing to your preferred page or make sure the canonical is self-referencing. But make certain there are no more than one canonical tag like this below
Look for
Also, I would use
- https://www.deepcrawl.com/ allowing free site crawls right now
- and/or
- https://www.screamingfrog.co.uk/seo-spider/ free up to 500 pages.
Just to confirm you do not have duplicate canonical's both tools will let you know for sure is will checking the source code of the page that is flagged. if it does not have duplicates I would report it to The Moz they are awesome at getting back to you and answering these types of issues if there is in fact only one canonical per a page.
I hope that helps,
Tom
-
Hi Gents, thanks for your replies.
Tom - Ive looked in detail at both the canonical references in the header on my page at they both look the same -
Line 23 -
href='http://www.completetenders.com/services/bid-management/' />
Line 133 –
href="http://www.completetenders.com/services/bid-management/" />
the only difference I can see is the first one uses '...' and the second one uses "..."
can you confirm if I should amend this in yoast or whether this is something that only moz is picking up as two different canonicals?
-
you are correct you should only have one canonical tag on a page Max
Because you're using WordPress Yoast SEO plug-in I can tell you that it automatically adds canonical URL for you when you are modifying thing that should be pointing somewhere else you have to go into the advanced area in the photo below.
So all of these URLs would show the same content:
- http://example.com/wordpress/seo-plugin/ you would want to point them all to the first URL via canonical
- http://example.com/wordpress/seo-plugin/?isnt=it-awesome
- http://example.com/wordpress/seo-plugin/?cmpgn=twitter
- http://example.com/wordpress/seo-plugin/?cmpgn=facebook
for more information on how to use that plug-in and remember only one per page and if the page is duplicate content pointed to the page that you want Google to assume is the owner of that content.
If you get stuck ask me or reference this below.
https://yoast.com/rel-canonical/
All the best,
Tom
-
Hi,
You could, but I would try to find out where the other one is coming from. Basically the second rel canonical tag will overwrite the first in most cases. So trying to find out how you delete one with keeping the right one would make most sense. You're at least on the right path!
Martijn.
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
-
On Page Grader - URL not accessible
We have tried to use the On Page Grader today and it is coming back with URL not accessible for all pages on our website. We previously used the On Page Grader on Friday 10th Nov for a couple of product pages with no issues. Since then, the only changes we have made on the websites is updating some downloadable documents. We have done this several times before and it has never affected Moz. We have not changed the page URLs, and therefore do not know why it is now not working. The pages are working fine on the website with no issues. A link to one of the pages is below. http://www.processinstruments.co.uk/products/dissolved-oxygen-monitor/ Any help would be greatly appreciated.
Moz Bar | | PiMike0 -
Title tag not registering on page optimization
I added a link to the "page optimization" section at moz. When I submit the url to be reviewed (click "optimize") it doesn't find the title tag, although it is definitely there e.g this page
Moz Bar | | digitalalchemy
http://naamanewman.co.il/photosGalleryID.aspx?id=34 Anybody as any Idea why is that? Maybe the tag placement on the DOM (it's not directly under the opening head tag).0 -
Sorry, but that URL is inaccessible?
Hi, I am trying to grade some pages and keywords using the "On-page grader" tool but for each URL that I try, the tool returns me a "Sorry, but that URL is inaccessible". The thing is that I have already used previously and without any problem some of these URLs. In fact, I have just realized that, while the same URL (for example: www.lacasadelaaldea.com) works in the "On-page optimization tool", it doesn't in the "On-page grader" right now. I have looked if someone could have experienced the same issue and I have found some other threads talking about it... so I have checked with my hosting provider that there is no firewall or any other thing causing this problem but they can't find anything. How do you make the call to the server? What could be happening? Thanks in advance, Juan
Moz Bar | | lcdla0 -
I'm checking keyword difficulty for two different sites. Would love to view the results by site instead of just one large list. Is that possible? Or would it just be easier to keep the lists separate in Excel and just import when I want an updated report?
I have keyword lists for two sites. Is there a way to label them in the keyword difficulty tool (List A, List B) so I can just view results for a particular site? Or do I need to run the report with List A, export results, delete those keywords, then run the report for List B?
Moz Bar | | JohnNovakLV0 -
Rank Tracker - URLs are Different when Exporting to CSV
When exporting to CSV in Rank Tracker, many of the URLs are reduced to the root domain instead of the full, ranking URL as seen within the tool. Right now the URLs must be copied/pasted or manually edited afterwards in the CSV. However, it doesn't happen to every item. A few of them do show the correct URL after being exported. Any idea if this is a bug or just an odd thing the export does?
Moz Bar | | AlfredGoldberg1 -
Suggestion for Improving the Crawl Report on Canonicals
This came up in the answer to a question I gave here http://moz.com/community/q/canonicals-in-crawling-reports#reply_222623 Wanted to post here to put it in as a suggestion on how to improve the Moz Crawl reports Currently, the report shows FALSE if there is no canonical link on a page and TRUE if there is. IF you get a TRUE response, this shows up as a warning in your report. I currently use Canonical to Self on almost all my pages to help with some indexing issues. I currently use the EXACT function in excel to create a formula to see if my canonical link matches the URL of the page (as this is what I want it to do). I can then know that the canonical is implemented properly, or if I need to manually check pages to make sure the canonical that points to another page is correct. I would like to suggest that the Moz crawl tool does this. It can show FALSE is the canonical is missing, TRUE if the canonical is present and SELF if the canonical points to the URL of the page it is on. I think for the most part this would be much more actionable information. I would even suggest that TRUE would need to be more of a high priority alert, and SELF can't do any damage, so I would leave that info in the CSV but not have that as a warning in the web interface. Thanks for listening!
Moz Bar | | CleverPhD0 -
Crwal errors : duplicate content even with canonical links
Hi I am getting some errors for duplicate content errors in my crawl report for some of our products www.....com/brand/productname1.html www.....com/section/productname1.html www.....com/productname1.html we have canonical in the header for all three pages <link rel="canonical" href="www....com productname1.html"=""></link rel="canonical" href="www....com>
Moz Bar | | phes0 -
Rel Canonical and Moz Crawl
we have Rel Canonical tags set up on a few pages. When viewing the page source, the tags are correct. However, Moz Crawl results show the opposite. for example the page source, correctly shows, URL X with a Rel canonical Tag of URL Y
Moz Bar | | S.S.N
but.. Moz crawl is showing URL Y with a Rel Canonical Tag of URL X ..any thoughts why this would happen? which should i trust more?0