Skip to Content
Account
Enter the email address on your account.
Forgot Your Username?
Enter your password.
Forgot Your Password?

Or continue with

J2Commerce 6

Product URLs and Routing

7 Min Read
On This Page

Every product in your store can be reached at more than one web address. That is normal, and by itself it is not a problem — but if you leave it unmanaged, two shoppers can open what they believe is the same product page and see two noticeably different pages.

This guide covers the two settings that control it. They solve two separate duplications, so most stores want both.

SettingLives inSolves
Product Page SurfaceJ2Commerce configurationThe product page vs. the article page
Strict RoutingJoomla's System - SEF pluginThe friendly URL vs. the raw index.php URL

Prerequisites

  • J2Commerce 6 installed and activated
  • Search Engine Friendly URLs enabled in System -> Global Configuration -> Site
  • At least one published product

Why a Product Has Several Addresses

Two things each create a second address for the same product.

1. Every product is backed by an article. J2Commerce builds products on top of Joomla articles, so the same content is reachable as a J2Commerce product page and as the plain Joomla article. Two pages, two layouts, one product.

2. Joomla answers both the friendly and the raw address. With Search Engine Friendly URLs turned on, Joomla writes friendly links into your site. It still answers the raw form if someone types or shares it. Both of these return the same product:

index.php?option=com_j2commerce&view=product&id=6927
graphic-kits/dirt/yamaha/yamaha-pw50-dirt-bike-graphic-kit-1990-2022-northstar-blue

Turning on Search Engine Friendly URLs does not switch the raw address off.

Part 1: Product Page Surface

This setting decides whether the product publishes as a product page, as an article, or as both.

Where to Find It

  1. Go to J2Commerce -> Configuration.
  2. Open the Product Display tab.
  3. Find Product Page Surface.

The Three Options

OptionWhat shoppers getUse it when
Both pagesThe product page and the article page are both published. This is the default.You are migrating, or you deliberately use articles for long-form content and product pages for buying.
Product pageThe product page is the published one. The article page points at it.Most stores. Your catalog is the storefront.
Article pageThe article page is the published one. The product page points at it.Content-led sites where the article is the real page and the cart is secondary.

What Happens to the Other Page

When you choose Product page or Article page, J2Commerce does three things to the one you did not choose:

  1. Adds a canonical link pointing at the page you chose, so search engines consolidate on it.
  2. Marks it noindex, so search engines stop listing it separately.
  3. Redirects visitors to the page you chose.

Choosing Both pages does none of these — both stay fully published, which is why it is the option that leaves a duplicate in place.

Note

J2Commerce leaves your own menu items alone. If you have built a menu item that points directly at the page being redirected away from, that menu item still works and is not redirected.

Part 2: Strict Routing

Product Page Surface does not touch the second duplication, the friendly-versus-raw address. That one is a Joomla setting.

What Goes Wrong Without It

The raw address does not match any menu item. When Joomla cannot match a menu item, it falls back to your default menu item — usually your home page — and applies that item's settings to the product page.

The result is one product, two visibly different pages. On a real store, the raw address produced:

  • An extra page heading and an extra breadcrumb trail, because the fallback menu item adds its own page header on top of the product layout's
  • A different page wrapper, so section styling did not match
  • Image zoom switched on, when the product page's own menu item has it switched off

Nothing is broken. The product still sells. But a shopper who arrives from a shared or bookmarked raw link gets a page that does not look like the rest of your store, and any page setting you made on the product menu item is quietly ignored.

Turning It On

  1. Go to System -> Plugins.
  2. Search for System - SEF and open it.
  3. Set Strict Routing to Yes.
  4. Click Save & Close.

Caution

Strict Routing is set to No on a new install. It is off by default in Joomla, so unless someone has already changed it, your store is serving both address forms right now.

What It Does

With Strict Routing on, a request to the raw address gets a 301 permanent redirect to the friendly one. The visitor lands on the correct page, with the correct menu item, the correct layout, and the correct settings. Search engines follow the redirect and keep only the friendly address.

Using the example from earlier:

Request:  index.php?option=com_j2commerce&view=product&id=6927
          ↓ 301 redirect
Lands on: graphic-kits/dirt/yamaha/yamaha-pw50-dirt-bike-graphic-kit-1990-2022-northstar-blue

The friendly address itself is not redirected, so there is no loop.

Verifying It Works

  1. Copy a product's friendly URL from your storefront.
  2. In the same browser, visit the raw form — your site address followed by index.php?option=com_j2commerce&view=product&id= and the product's ID. You can read the ID from J2Commerce -> Catalog -> Products.
  3. Watch the address bar.

Working: the address bar changes to the friendly URL and the page looks exactly like the one you copied in step 1.

Not working: the address bar keeps the raw form. Re-check that Search Engine Friendly URLs are on and that you saved the plugin.

Configuration Options

SettingWhereDefaultRecommended
Product Page SurfaceJ2Commerce -> Configuration -> Product DisplayBoth pagesProduct page for most stores
Strict RoutingSystem -> Plugins -> System - SEFNoYes
Search Engine Friendly URLsSystem -> Global Configuration -> SiteYesYes — required for Strict Routing to do anything

Tips

  • Set both of these before you submit a sitemap or start an ad campaign. Changing them later means search engines have to re-crawl and re-consolidate, which takes time.
  • Strict Routing is a site-wide Joomla setting. It applies to every component on your site, not only J2Commerce.
  • If you have paid links pointing at raw addresses, update them at the source. A campaign parameter on the end of a raw address prevents the redirect from firing — see Troubleshooting below.
  • Build a menu item for your product list view. Product URLs route through their category, so a menu-bound catalog gives you tidier addresses throughout.

Troubleshooting

The raw URL still does not redirect, and it has a tracking parameter on the end

Cause: Joomla's Strict Routing deliberately does nothing when the address carries an extra parameter it cannot fold into the friendly URL. Campaign tags such as utm_source, gclid, and fbclid are the common case. Joomla takes the cautious route and leaves the address alone rather than risk discarding your tracking data.

Solution: Fix the links at the source — point your ads, newsletters, and affiliate links at the friendly URL with the campaign tag appended to that:

  1. Copy the product's friendly URL from your storefront.
  2. Append the campaign parameters to it.
  3. Update the campaign, newsletter, or affiliate feed to use the new link.

Shoppers report the product page looks different from the rest of the site

Cause: They arrived on the raw address, so a fallback menu item supplied the page settings.

Solution: Turn on Strict Routing as described above, then confirm with the verification steps.

I set Product Page Surface but both pages are still published

Cause: The setting was left on Both pages, or a menu item points directly at the page you expected to be redirected away from.

Solution:

  1. Re-check J2Commerce -> Configuration -> Product Display.
  2. Check Menus for an item pointing at the other page. A direct menu item is respected and is not redirected. Remove or repoint it if you did not intend it.

Product URLs are missing their category path

Cause: The product's backing article has no category, or the category itself is unpublished.

Solution: Open the product, confirm it is assigned to a published Joomla category, and save.

Still stuck? Our team can help.

Back to Top