SEO

One article, six addresses: duplicate URLs in Joomla

One article, six addresses: duplicate URLs in Joomla

One Joomla article can answer on five or six URLs. Where the duplicates come from, which core settings fix them, and how to see which URL Google picked.

Take any article on an older Joomla site and count the addresses it answers on. With and without www. With and without index.php. Through its menu item, through the category blog it sits in, through /component/content/article/ when Joomla cannot find a matching menu item. Five or six URLs for one page is normal. Search engines see each of them as a separate page with the same text, and they have to guess which one is real.

Why it matters

Duplicate content on your own site does not get you a penalty. That is a persistent myth. What it does cost you is control. Links to the article are spread over several URLs instead of counting for one. Google picks its own preferred version, and that is sometimes the ugly one with ?Itemid= in it. And your crawl budget goes to pages that add nothing, which on a site with thousands of articles means new content gets picked up later.

Where the extra URLs come from

  • Host variants. http and https, www and the bare domain. Four combinations that all serve the same site unless something redirects them.
  • index.php in the path. With URL rewriting on, /blog/my-article and /index.php/blog/my-article both work.
  • Two menu items, one article. An article linked from the main menu and again from a hidden menu has two paths. Same for an article that is reachable as a Single Article item and through a Category Blog item.
  • No menu item at all. Joomla falls back to /component/content/article/alias?catid=8&Itemid=101. Those URLs show up in search results more often than you would like.
  • IDs in the path. With the legacy router, /blog/12-my-article and /blog/my-article can both resolve.

Fix the host first

Pick one host and redirect the others to it with a 301. In the Global Configuration, on the Server tab, set Force HTTPS to Entire Site. For www versus no www, add a rewrite rule to .htaccess that sends one to the other. Most hosting panels can do this too, but a rule in .htaccess moves along with the site when it changes host.

Then open the plugin System - SEF and fill in Site Domain with the full preferred address, for example https://www.example.com. With that field filled in, Joomla adds a <link rel="canonical"> to every page that points to the same path on the preferred domain. Leave it empty and Joomla adds no canonical tag at all, which is the default on most sites.

Clean up the paths

  1. Turn on URL rewriting. Global Configuration, Site tab: Search Engine Friendly URLs and Use URL Rewriting both on, and htaccess.txt renamed to .htaccess. Newer versions of the System - SEF plugin can also redirect requests that still contain index.php and enforce a trailing slash rule; check which options your version offers and switch them on.
  2. Switch to the modern router. In Articles, Options, on the Integration tab, set URL Routing to Modern and Remove IDs from URLs to Yes. On an existing site this changes URLs, so do it together with the redirect step below, not on a Friday afternoon.
  3. One menu item per page. If an article needs to appear in two menus, make the second one a Menu Item Alias instead of a second Single Article item. The alias links to the existing URL instead of creating a new one.
  4. Give orphaned content a home. Every category that holds public articles should have a menu item somewhere, even in a hidden menu, so Joomla never has to fall back to /component/ URLs.

Catch the old URLs

Any URL that changes keeps getting requests from old links and from search engines for months. Make sure System - Redirect is enabled with Collect URLs on, and let it run for a week after the change. The Redirects component then lists every 404, and you can point each one to the new address. Do the most visited ones first; the list is sorted by hits.

Check what Google picked

In Google Search Console, run a few key articles through URL Inspection. It shows the user-declared canonical, which is what your page says, and the Google-selected canonical, which is what Google decided. When those two differ, Google found a reason to disagree: a redirect missing, an internal link still pointing to the old path, or a sitemap that lists the wrong variant. The Pages report also has a section for duplicates without a user-selected canonical, which is a good to-do list after the first cleanup.

A short checklist

  • One host, with the other three redirected by a 301.
  • Site Domain filled in on System - SEF.
  • No index.php in URLs, and no IDs if you use the modern router.
  • Every article reachable through exactly one menu path.
  • Redirect plugin collecting 404s after every URL change.
  • URL Inspection showing the same canonical twice.

None of this needs an extension. It is an afternoon of settings and a week of watching the redirect list, and after that every new article starts with one address instead of six.

Stuck on something else?

Doctor Joomla is a project of Cloudfaction, a Dutch agency building and maintaining Joomla sites since 1999. The articles are made with the help of AI, so tell us if something does not match your screen. Mail info@cloudfaction.nl if you want someone to look at yours.

Rather have someone look at it

Doctor Joomla is a Cloudfaction project.

A Dutch agency that has been building and running Joomla sites since 1999. If your site needs more than an article can fix, get in touch.