3130%
Rating 0 stars - 0 votes

How to regenerate Magento 2 url keys for products in bulk

Setting up your Magento store for search engines, you are supposed to consider many aspects, and product URL key optimization is among them. Magento 2 URL key is a part of product URL that is in fact an address of a product page on your site. Making URLs relevant and unique is the first step to getting higher priority in search engine result page.


By default Magento generates URL keys based on product name. Although your product name may include some stop words, that does not conform SEO standards or you just need to update Magento 2 URL keys for products across store views.


magento 2 url of product in browser
How to Regenerate Magento 2 URL Keys for Products in Bulk


To rewrite URL keys for multiple products, you can resort to usual product editing or make use of Store Manager import facility and bulk update keys in one go.


URL Key VS URL Path

Before regenerating keys for your Magento 2 products, consider that URL key and URL path are different notions. Url_key is the part of static URL that describes a product or a category. It is filled in Magento as is. If there is not value provided, Magento takes the name of the product, lowercasing it and replacing blanks with hyphens. Url_path is created from URL key and product URL suffix specified in Stores->Settings->Configuration->Search Engine Optimization.



magento 2 product url settings
How to Regenerate Magento 2 URL Keys for Products in Bulk


Updating URL Keys Through Import

In order to regenerate Magento URL keys in the process of import, you should of course include them in the import file. If you need to update URL keys only, then it will be enough to have product identifier (SKU or ID) and product URL key itself in the feed. There is no need to input URL path, since it will be created automatically as it has been already outlined. Sample file we use for import includes columns for product identification and URL keys.


Magento URL Keys Import File
Sample File to Import URL Keys

Further the file should be uploaded to your store via the import profile. In order to update URL keys successfully make sure you have configured the settings as we outline below.

  • Having several languages enabled on your store, you will get them displayed on Select Store View to Import Products to step. If you need to regenerate Magento 2 URL keys for a specific store view, then you need to disable [Default Values] Store View checkbox above and select specific store view respectively.

  • Magento URL Keys Import Select Store View
    Select a Store View to Import URL keys To

  • Further you have to link fields of your import file to corresponding ones within Magento database and select a suitable identifier. In our case it's Product ID:

  • Magento URL Key Import Mapping Step
    Select Identifier and Map Fields from the File to Database


  • The last step requires you to designate import options. Magento 2 URL key update will be performed if you configure the settings as following:


  • Magento Import URL key Update Import Method Step
    Select the Import Method in This Step


Product URLs play an important role in evaluating how well your site is indexed by search engines. Make your store SEO friendly setting up relevant product URLs with Store Manager. Regenerate URL keys in the most approachable way for numerous entities.



Regenerate URL Keys for Products Through Import Try Now




Related Articles:


update meta details massively using import tutorial

Magento 2 SEO: Bulk Add/Update Meta Details

Check detailed guides updating Magento meta details or creating unique ones and get a sample of the import file. Read More...

Check Magento Data Integrity with Store Diagnotics Tool Toturial

Detect Magento Data Integrity Issues

Learn how to use Store Diagnostics tool to detect problems related to product attributes automatically. Read More...

Multi Source Inventory in Magento 2 Tutorial 1

Multi Source Inventory in Magento 2

Tutorial on how track inventory on multiple Magento product sources (MSI). Read More...

magento 2 SEO features

Magento 2 SEO Features

The ultimate guide on Magento 2 SEO optimization (XML map generation, meta tags optimization, etc...) Read More...

COMMENTS
Magento Store ManagerMod Teodor • 09/07/2021

If you mean the functionality of Store Manager, yes it's also possible to update URL keys with the Multi Editor tool a proper SQL expression.

Live Chat