• Thu. Feb 25th, 2021

SEO Best Practices for Canonical URLS + the Rel=Canonical Tag – Whiteboard Friday

[Music] howdy Moz fans and welcome to another edition of whiteboard Friday this week we're going to chat about some SEO best practices for canonicalization and use of the rel canonical tag before we do that I think it pays to talk about what a canonical URL is because a canonical URL doesn't just refer to a page upon which we are you know targeting or using the rel canonical tag canonicalization has been around in fact much longer than the rel canonical tag itself which came out in 2009 and there are a bunch of different things that a canonical URL means so first off what we're trying to say is this URL is the one that we want Google and the other search engines to index and to rank and these other URLs that potentially have similar content or that are serving a similar purpose or perhaps are exact duplicates but for some reason we have additional URLs of them those ones should all tell the search engines no no this guy over here is the one you want so for example I've got a canonical URL abc.com slash a right then I have a duplicate of that for some reason maybe it's a historical artifact or a problem in my site architecture maybe I intentionally did it maybe I'm doing it for some sort of tracking or testing purposes but that URL is at abc.com slash b then I have this other version abc.com slash a question mark ref equals Twitter what's going on there well that's a URL parameter the URL parameter doesn't change the content the content is exactly the same as a but I really don't want Google to get confused and rank this version which can happen by the way you'll see URLs that are not the you know original version that have some weird URL parameter ranking and Google sometimes sometimes this version gets more links than this version because it was shared on Twitter and so that's someone everybody picked up and copied and pasted it in link to that's all fine and well so long as we can on applies it or this one it's a print version it's abc.com slash a print dot HTML so in all of these cases right what I want to do is I want to tell Google don't index this one index this one don't index this one index this one don't index this one index this one and I can do that using this the the link rel equals canonical the href telling you know telling Google this is the page you put this in the in the header tag of any document and Google will know AHA this is a copy or clone or a duplicate of this other one I should canonicalize all of my ranking signals and I should make sure that this other version ranks by the way you can be self referential so it is perfectly fine for ABC com /a to go ahead and use this as well pointing to itself that way in the event that someone you've never even met decides to plug in you know question mark some weird parameter and and point that to you you're still telling Google hey guess what this is the original version great so since I don't want Google to be confused I can use this canonicalization process to do it the rel equals cannot equal canonical tag is a great way to go by the way fYI it can be used cross domain so for example if I republish the content on a at something like a you know medium calm slash you know at Rand fish which is I think my medium account slash a guess what I can put any cross domain rel canonical' telling them this one over here and now even if Google crawls this other website they are gonna know that this is the original version pretty darn cool okay there's different ways to canonicalize multiple URLs I mentioned that rel canonical isn't the only one it's one of the most strongly recommended and that's why I'm putting it at number one but there are other ways to do it and sometimes you want to apply some of these other ones there are also not recommended ways to do it and I'm going to discuss those as well so the second one is a 301 redirect 301 redirect this is basically a status code telling Google hey you know what I'm gonna take slash B I'm gonna point it to slash a it was a mistake to ever have slash B I don't want anyone visiting it I don't want it clogging up my web analytics with visit data you know what let's just 301 redirect old URL over to this new one over to the right one number three passive parameters in Google search console some parts of me like this some parts of me don't I think for very complex websites with tons of URL parameters and a ton of URLs it can be just an incredible pain sometimes to go to your web dev team and say like hey we got to clean up all these URL parameters I need you to you know add the rel canonical tag to all these different kinds of pages and here's what they should point to and here's the logic to do it and they're like yeah I guess what SEO is not a priority for us for the next six months so you're gonna have to deal with it and probably lots of SEO is out there I've heard that from their web dev teams well guess what you can end around it and this is a fine way to do that in the short short term login to your Google search console account that's connected to your website right make sure you're verified and then you can basically tell Google through the search parameters section to make certain kinds of parameters passive so for example you have session ID equals you know blah blah blah blah blah you can set that to be passive you can set it to be passive on certain kinds of URLs you can set it to be passive on all types of URLs that helps tell Google hey guess what whenever you see this you know URL parameter just just treat it like it doesn't exist at all and that's a that can be a helpful way to canonicalize number four you can use location hashes so let's say that my goal with slash b was basically to have exactly the same content as slash a but with one slight difference which was i was gonna take a block of content about a subsection of the topic and place that at the top so you know a has you know the the section about whiteboard pens up at the top but b puts the section about whiteboard pens toward the bottom and they put the section about whiteboards themselves up at the top well it's the same content same search you know intent behind it i'm doing the same thing well guess what you can use the hash in the URL so it's a hash b and that will jump someone it's also called a fragment URL jump someone to that specific section on the page you can see this for example moz.com slash about slash jobs I think if you plug in hash listings will take you right to the job listings instead of reading about you know what it's like to work here you can just get directly to the list of jobs themselves now that's Google considers that all one URL so they're not going to rank them differently they don't get indexed differently they're essentially canonicalized to the same URL okay not recommended I do not recommend blocking Google from crawling one URL but not the other version because guess what even if you use robots.txt and you block Google got Spyder right and you send them away and they think they can't reach it because you said robots.txt disallow /b they are still Google will not know that /b and /a have the same content on them how could they they can't crawl it so they can't see anything that's here it's invisible to them therefore they'll have no idea that any ranking signals any links that happen to point there any engagement signals any content signals whatever ranking signals that might have helped a rank better they can't see them if you canonical eyes in one of these ways now you're telling Google yes B is the same as a combined their forces give me all the rankings ability number six I would not recommend also not recommend blocking indexation so you might say oh well Rand I'll use the meta robots no index tag so that way Google can crawl it they can see that the content is the same but I won't allow them to index it guess what same problem they can see that the content is the same but unless Google's you know smart enough to automatically canonical eyes which I would not trust them on I would always trust yourself first you are essentially again preventing them from combining the ranking signals of B into a and that's something you really want seven I would not recommend using the 302 the 307 or any other 3o X other than the 301 this is the guy that you want it is a permanent redirect it is the most likely to be most successful in canonicalization even though google has said we often treat 301 and 302 similarly the exception of that rule is but a 301 is probably better for canonicalization guess what we're trying to do do not Agra lies number eight don't for o-x the canonical version or the non canonical version so don't take /b and be like oh okay that's not the version we want anymore will 404 it don't 404 when you could 301 if you send it over here with a 301 or you use the medic the the rel canonical' in your header you take all the signals and you point them to a you lose them if you 404 that in be right now now all the signals from B are gone that's a sad and terrible thing you don't want to do that either the only time I might do this is if the page is very new or it was just an error and you don't think that has any ranking signals you got a bunch of other problems you don't want to deal with having to maintain the URL and the redirect long term fine but if this was a real URL and real people visited it and real people link to it guess what you need to redirect it because you want to save those signals last but not least when should we canonicalize URLs versus not well if it is the case that the content is either extremely similar or exactly duplicate on two different URLs two or more URLs you should always collapse and canonicalize those to a single one also if the content is not duplicate maybe you have two pages that are completely unique about white board pens and white boards but even though the content is unique meaning the phrasing and the sentence structures are the same that does not mean that you shouldn't canonicalize for example this whiteboard Friday about using the rel canonical about canonicalization is going to replace an old version from 2009 we are gonna take that old version and we are going to use the rel canonical why are we gonna use the rel canonical so that you can still access the old one if for some reason you want to see the version that we originally came out with in 2009 but we definitely don't want people visiting that one and we want to tell Google hey the most up-to-date one the new one the best one is this new version that you're watching right now I know this is slightly meta but that is a perfectly reasonable use what I'm trying to aim at is searcher intent so if the content is serving the same or nearly the same searcher intent even if the keyword targeting slightly different you want to canonicalize those multiple versions Google's to do a much better job of ranking a single piece of content that has lots of good ranking signals for many many keywords that are related to it rather than splitting up your link equity and your other ranking signal equity across many many pages that all targets slightly different variations plus it's a pain in the butt to come up with all that different content you would be best served by the very best content in one place third if your republishing or refreshing or updating old content like the whiteboard Friday example I just used you should use the rel canonical in most cases there are some exceptions if you want to maintain that old version but you'd like the old versions ranking signals to come to the new version you can take the content from the old version republish that at you know /a – old then take /a and you know reap and redirect that or publish the new version on there and have that version be the one that is canonical and the old version exists at some URL you've just created but that's that's slash old right so republishing refreshing updating the old content generally canonicalization is the way to go and you can preserve the old version if you want if you have content that is expiring right a piece of content a product an event something like that that's it's going away it's no longer available and there's a next best version the version that you think is most likely to solve the searchers problems and that they're probably looking for anyway you can canonicalize in that case usually with a 301 rather than with a rel canonical because you don't want someone visiting the old page where nothing's available you want both searchers and engines to get redirected to the new version so good idea to essentially 301 at that point okay folks look forward to your questions about rel Canonical's canonical URLs and canonicalization in general and SEO and we'll see you again next week for another edition of whiteboard Friday take care

Leave a Reply

Your email address will not be published. Required fields are marked *