CustomUrlRewrite - Automatic URL Conflict Resolution
- SKU
- CustomUrlRewrite
Description / CustomUrlRewrite - Automatic URL Conflict Resolution
MAGENTO 2 · CATALOG · URLS
Resolve URL conflicts when saving a product.
Kowal CustomUrlRewrite
Kowal CustomUrlRewrite automates the search for an available URL key. When an address is already taken, it checks the next numeric suffixes, reducing manual collision fixes in the catalog.
Collision detection · Numeric suffixes · Save automation
HOW IT WORKS IN PRACTICE
01 · You save a product
The module reads the product URL key.
02 · It checks existing addresses
It verifies collisions in the URL rewrite table.
03 · It selects an available key
If there is a conflict, it checks the next suffixes: -1, -2, and so on.
What does your store gain?
Explore the module features, how to use it, and the settings you can adapt to your sales process.
Unique product URLs without manual conflict resolution
Kowal_CustomUrlRewrite is a Magento module that automatically manages the uniqueness of product URLs, eliminating issues related to duplication. With our module, you can reduce errors caused by address conflicts during saving, organize URLs for SEO, and streamline product management in your store.
Key Features
- Automatic URL Conflict Resolution: The module automatically detects existing URLs and adds a numeric suffix to find an available URL key. This reduces the risk of errors when saving products.
- SEO Improvement: Unique URLs are essential for search engine optimization. The module ensures that each product has a unique and SEO-friendly URL, which can have a positive impact on your store rankings.
- Easy Integration: The module integrates with the native Magento URL rewrite system without requiring complex configuration or core system modifications.
- Optimal Performance: It checks existing addresses in the URL rewrite table. Automation reduces manual conflict resolution; the impact on save time depends on the catalog size and the number of collisions.
- Flexibility and Extensibility: The logic for creating unique addresses can be customized through code extension to match business needs. The current version uses consecutive numeric suffixes.
Benefits for You
- Save time with automatic URL management.
- Eliminate errors related to duplicate product URLs.
- Organize addresses to support your store visibility in search engines.
- Manage addresses more easily in a large product catalog.
Installation
Installing the Kowal_CustomUrlRewrite module is quick and simple. You can install the module in two ways: using a ZIP file or Composer.
Method 1: Installation from a ZIP File
- Unzip the ZIP file: Extract the module to
app/code/Kowal, into the subdirectory matching its registration — in the verified code, this isCustomUrlChecker. - Enable the module: Run the command:
php bin/magento module:enable Kowal_CustomUrlChecker - Apply updates: Update the database by running:
In production, use thephp bin/magento setup:upgrade--keep-generatedoption according to your store deployment procedure. - Clear the cache: Complete the installation by clearing the cache:
php bin/magento cache:flush
Method 2: Installation via Composer
- Add the Composer repository: Configure the repository that provides the purchased package. The command below from the previous instruction applies to repo.magento.com and is valid only if the package is available there:
composer config repositories.repo.magento.com composer https://repo.magento.com/ - Install the module: Run the command:
composer require kowal/module-customurlrewrite - Enable the module: Enable the module using the command:
php bin/magento module:enable Kowal_CustomUrlChecker - Apply updates: Update the database:
In production, use thephp bin/magento setup:upgrade--keep-generatedoption according to your store deployment procedure. - Clear the cache: Clear the cache to complete the installation:
php bin/magento cache:flush
With the Kowal_CustomUrlRewrite module, managing URLs in Magento will become simpler, more efficient, and better optimized for SEO. Order now and enhance your store functionality!
Example and module name
If the key produkt conflicts with an existing address, the module checks produkt-1, then produkt-2, and subsequent suffixes. In the verified code, searched paths end with .html.
The commercial name and package remain CustomUrlRewrite / kowal/module-customurlrewrite. The older instruction indicated Kowal_CustomUrlRewrite, while the verified version registers the module as Kowal_CustomUrlChecker; this name should be used when enabling it.
From configuration to result
1. You save a product
The module reads the product URL key.
2. It checks existing addresses
It verifies collisions in the URL rewrite table.
3. It selects an available key
If there is a conflict, it checks the next suffixes: -1, -2, and so on.
From conflict to available address
Base key: produkt
Address taken: produkt.html
Next checks:produkt-1.html → produkt-2.html
The verified version of the code searches for paths ending with .html.
Organize addresses in your Magento catalog
Want to adapt the module to your store? Ask about Kowal CustomUrlRewrite implementation and discuss the configuration or necessary extensions.
More Information
| Theme compatibility | Luma / Blank, KOWAL |
|---|
Module Installation Instructions
Installation
* In a production environment, please use the --keep-generated option
Type: Composer
- The module is available in the Composer repository:
- Private GitLab repository:
https://gitlab.com
- Private GitLab repository:
- Add the Composer repository to the configuration:
composer config repositories.custom.url.write vcs https://gitlab.com/magento2ext/magento-2-customurlrewrite - Add an access token for the private GitLab repository:
composer config --auth gitlab-token.gitlab.com - Install the module using Composer:
composer require kowal/module-customurlrewrite - Apply database updates:
php bin/magento setup:upgrade - Clear the cache:
php bin/magento cache:flush