How to Create New Product URLs After Import in Magento 2

- Magento 2, Our extensions

Chances are, you need to create unique URLs while importing products to your Magento 2 website to enhance SEO and reach more potential buyers. The default import process doesn’t let you apply changes to product data of this kind. You only need to create new SEO-friendly URLs manually or use an SEO tool that can help you replace the existing product addresses. However, there is a more user-friendly approach. The Improved Import & Export Magento 2 extension lets you create new product URLs after import due to the “Enable Product Url Pattern” parameter.  In the following article, we explore the corresponding functionality. Go to our Magento 2 Developer’s Cookbook for more recommendations on how to improve your daily data transfers and other routine processes.

Enable Product Url Pattern: The Option’s Definition & Impact

“Enable Product Url Pattern”  is a feature that displays a field where you can specify the pattern to create URLs for newly imported products. There are two variables that you can use:

  • [rand(numeral, numeral)] – where numerals are any numbers in between which the random number will be generated and added to the URL.
  • [product_attribute_code] – here you can replace ‘attribute_code‘ with the code of any attribute used in the imported product to fetch this attribute’s value into the final product URL.

As a result, your product URL pattern may look as follows: 

buy_[rand(5, 15)]_[product_name]_[product_sku]_[product_color]

How to Create New Product URLs After Import in Magento 2

The whole process of creating new product URLs is reduced to a few clicks: 

  1. First of all, you need to create a new import job. Hit the “Add New Job” button under System -> Improved Import/Export -> Import Jobs.
  2. Next, enable your job and specify its title on the General Settings tab. You can also configure the update frequency.
  3. Now, you can choose Products as your import entity on the Import Settings tab to display additional settings.
    Magento 2 Products add edit import export
  4. Scroll down to the “Enable Product Url Pattern” option and turn it on.
  5. The “Product Url Pattern” field displays, where you can specify your new product URL pattern.
  6. Configure other parameters and save your import job.

Now, you can import products to Magento 2, changing their URLs according to a new SEO-friendly pattern. For further information on how to import Magento 2 products, follow this link: The Complete Guide to Magento 2 Product Import.

Improved Import & Export Features

The ability to change product URLs upon import in Magento 2 isn’t the only benefit of Improved Import & Export. As previously stated, the plugin fundamentally redesigns the platform’s default import and export routines. 

You will be able to avoid time-consuming and unpleasant file modifications. By default, all other file types should be converted to CSV because Magento 2 only accepts CSV files. But you can freely import and export files in CSV, XML, JSON, ODS, and XLSX formats using the Improved Import & Export extension.

Along with that, you can use numerous file sources, including Google Drive and Dropbox. Besides, it is also possible to use FTP/SFTP, direct file uploads, and URL uploads to exchange data between Magento 2 and other systems. Or you can rely on Google Sheets

Magento 2 Products add edit import export

Because of the comprehensive API support introduced in our module, you may also avoid utilizing third-party services in data exchanges. Import & Export allows you to link your e-commerce website to external systems via direct API transfers.

Scheduling is another major innovation incorporated in every import and export profile. It enables you to automatically update your e-commerce website at predefined intervals. 

Furthermore, the extension’s extensive mapping features allow you to convert third-party attributes to Magento 2 attributes as needed, as well as build new attributes and values. For further information, go to the following materials: