Select your language

 

The purpose of canonical URL

When we talk about canonical URL, half the time we talk about it while ignoring or forgetting the purpose of this attribute in HTML pages.

During the development of the Crusco Canonical URL plugin for Joomla, I documented myself as much as possible by re-reading new and old books on the SEO.
I quote this passage, taken from SEO Warrior by John I Jerkovic, published by O'Really Media:

A canonical link is like a preferred link. This preference comes to light when we are dealing with duplicate content and when search engines choose which link should be favored over all others when referring to identical page content~ SEO Warrior

I want to repeat it one more time: the purpose of the canonical URL is to specify to search engines which link to prefer when, during the indexing process of a website, the exact same content is encountered accessible from different links.
STOP!

The canonical URL has little to do with SEF URL (the canonical can also be non-SEF).

The canonical URL has nothing to do with redirects.

Be suspicious of anyone who tells you otherwise, because they either do not know the topic well, or they try to sell you a product stuffed with unnecessary or even harmful features.
Let's be clear, the promotional push may also be present.
I have tagged our plugin in the JED that it also shows up for users interested in SEF, although, as mentioned earlier, not strictly related to SEF.
But I read about software dedicated to managing canonical URLs that do redirects and indiscriminate cleanup operations on SEF addresses!

This only entangles an already unclear topic, except to insiders.

But the real risk is that, as we shall see, this confusion can be fatal to the positioning of some content.

 

What are query strings

Although the canonical URL is not closely related to the SEF, it is only when these work together that you get the best results with search engines.
Perhaps this is what has caused the aspects and prerogatives of one to spill over sometimes (improperly) to the other.

Let's talk about query strings.
Query strings are parameters that appear to the right of the address of a resource on the network.
In our case, the resource is a web page.
Query strings are separated from the page address by the question mark character (?).

Here is an example well known to everyone:

https://www.google.com/search?q=today+weather

All that is to the right of the question mark are the query strings.
Query strings are used to make dynamic the data returned by the page we are visiting.
Each query string consists of a parameter=value pair.
There are usually multiple pairs, and each pair is separated from the other by the symbol “&”

The query string in the example is used to query Google's search “page” to ask it to extract indexed results for the keywords today+weather.

It is easy to realize the importance of the query string, isn't?

Yet when it comes to SEF URLs, query strings are often demonized.

 

SEF and query strings... watch out!

Let's be clear, SEF URLs are great for the SERPs.
The main reasons are two:

  • increase the readability of links;
  • allow keyword entry.

SEF URLs turn this link
https://www.miosito.it/index.php?option=com_content&view=article&id=109&catid=18&lang=it&Itemid=116

into this other one
https://www.miosito.it/blog/spaghetti-alla-carbonara-ricetta-tradizionale

which is undoubtedly more appealing to both users and search engines than its non-SEF counterpart.

The link above takes you to the article "Spaghetti alla carbonara: ricetta tradizionale", which we can define as a "static" resource, meaning that it cannot return dynamic article content to the user by means of string queries.
This type of resource might involve at most a query string that we might call a “format” query, for example, one that allows us to display a print version of the article

https://www.miosito.it/blog/spaghetti-alla-carbonara-ricetta-tradizionale?print=1

but unless you want to index the printable version (an extremely bizarre choice), it is fair to say that the canonical URL can dispense with query strings and be clear and user-friendly:

https://www.miosito.it/blog/spaghetti-alla-carbonara-ricetta-tradizionale

But it is not always so.

I often wonder why the whole world is so prone to generalise. Generalisations are seldom if ever true and are usually utterly inaccurate. ~ Agatha Christie

Often the query strings that accompany SEF URLs, refer to pages that return dynamic content.
In such cases, proponents of less is better are warned, the eagerness to have a canonical URL devoid of query strings could be harmful!

The example I want to bring to you involves Blogs, such as the one you are reading right now.

Today that we receive streams of information from the Web each hour, the phrase "Content is king" is more than ever a mantra for anyone who wants to share their experiences and knowledge on a Blog.
To reach people in this context, quality of content must be accompanied as much as possible by plenty of content.
The most popular CMSs have come to meet these needs by implementing a simple and effective solution for dealing with long content: pagination.

The benefits of pagination are numerous and ranging from the technical ones related to SEO, to the purely user-focused ones, such as preventing your readers from fleeing in front of yet another endless web page!

Making it short: did you write a looong article?
Then you need to use pagination!

You forgot that we were talking about query strings right? 🙂
Don't worry, now let's get back on the rails, because pagination involves exactly the use of query strings.

 

A practical example with Joomla

I will give specific examples for Joomla from now on, but the discussion in general applies to any CMS.

Split your endless article into five pages.

Don't know how to make an article multipage in Joomla?
We recommend that you read Explore the core: multiple pages, tabs and sliders with the Page Break Plugin on Joomla! Magazine

Starting from the first page you can move to the others using the forward/backward keys or the table of contents.
You will notice that each of the five pages has a slightly different SEF address than the others:

  1. https://www.miosito.it/blog/endless-article
  2. https://www.miosito.it/blog/endless-article?start=1
  3. https://www.miosito.it/blog/endless-article?start=2
  4. https://www.miosito.it/blog/endless-article?start=3
  5. https://www.miosito.it/blog/endless-article?start=4

Each address invokes a distinct part of the article, and it is clearly the query strings start=x that allow one part to be displayed rather than another.

Now you have five different pieces of content to get indexed, but from the CMS you can specify only one canonical URL per article.
What address should you specify as "canonical"?

 

The best solution

You definitely should NOT remove query strings, as this would result in indexing only the first page.

The least worst thing you can do is not to specify any canonical URL. In that case, search engines could find all five pieces of content, although they would neither be able to sort them nor understand that they are part of the same article.

But why should you do the least worst thing and not the best thing?

The "SEO URL Structure for Pagination", available in the Personal, Professional and Agency plans of the Crusco Canonical URL plugin for Joomla, takes care of setting up canonical URLs for each page and reporting both that they are part of the same longer content and the correct reading order through page relationship values, recommended by the W3C and used for web accessibility and ADA compliance.

All of these things increase your website's evaluation by search engines, and the plugin takes care of that for all Joomla! elements for which pagination is provided:

  • multipage articles;
  • archived articles;
  • featured articles;
  • category blog;
  • category list;
  • search;
  • tagged items;
  • compact list of tagged items;
  • list all tags.

Cool isn't it?
To learn about all the features of this plugin, visit the page of Crusco Canonical URL plugin for Joomla!

 

Conclusions

In this article, we discussed how detrimental it can be to our website ranking to demonize query strings in SEF addresses when they are to be used as canonical URLs.
The example of content pagination is the most common one, but there are many other situations that can happen while using CMSs.

If you want to handle them as best you can, without taking on extra work, our advice is always to turn to professionals who have already dealt with and solved these problems.
If you use Joomla, we can't help but recommend our plugin, which handles precisely these situations and all those involving canonical URLs.

Let the level up be with you!

 

  • Supports all standard components and views of Joomla!
  • Automatically generates canonical URLs
  • Supports custom Canonical URLs
  • Supports websites with multilanguage content
  • Create the relationship structure for multipage content
  • Joomla! 5 native support