Previously, I wrote a blog post covering the very basics of technical SEO. I really only covered the bare essentials and naturally left out smaller, more specialized aspects. Today I’d like to take a close look at what are known as canonical tags and URLs and hreflang tags (also known as attributes).
Before we go any further, I would also like to point out:
Canonical and Hreflang tags are for URLs are used to prevent issues with duplicate content.
That’s pretty much it. You will often see them mentioned together, but remember that they are not the same thing and have very different functions.
What is a canonical URL/tag in SEO?
We’ll start with the canonical tag (also known as a canonical link). As you may well know, duplicate content is probably one of the greatest sins of content marketing. Google’s minion spiders certainly won’t be amused if you have multiple pages on your site that have the same content (even if it is relevant or necessary). You’ll still get penalized (not in a fire-and-brimstone sort of way of course, though I wouldn’t be surprised if Google is working on that. Ouch).
For the most part, this makes sense. A website with the same content on multiple pages is just boring. However, as a webmaster you may come across instances where it makes sense to copy the content onto other pages. Product descriptions are a great example.
What to do then?
Essentially, you want this content to be indexed but only on one page. You want to avoid it to appear on other pages (for informative reasons) and will perhaps link to it, however you don’t want Google to consider it and penalize you. This is where the canonical tag comes in. Essentially, it’ll tell you that similar-looking URLs are the same.
The process of canonicalization is as follows:
- First, pick the page that you actually want to canonicalize. Consider this to be your “one and only” in terms of indexing. Which one is the most important is up to you (maybe it’s the page with the most traffic, the most backlinks, etc.).
- So if you choose, for example, http://www.example.com/about-page as your canonical page, you then add the canonical link to the non-canonical page(s) like so:
That’s all you have to do.
What are Hreflang tags?
Hreflang tags (or attributes) carry out a function in the same area as canonical tags, in that they avoid duplicate content. However, the attribute itself will tell Google that one page is specifically for one country/language. What’s pretty handy is that you can have two English languages sites with the same content. However, they’ll be directed at different countries. See below:
One hreflang tag is for the States, the other is for the UK. A lot of the advice I originally read about hreflang tags focused on multiple sites in multiple languages, but I cannot stress the importance of using it in on same-language sites in multiple countries.
With regards to hreflang, you can of course simply do away with it and rewrite the content. That’s fine too, but it is a lot of work (and money).