
Before you begin, make sure that you understand exactly what the redirect should accomplish. Think in terms of target / original request or redirect to / redirect from. Although people might still navigate to the former page from search engines or outdated links, the redirect causes your store to switch to the new target.
If automatic redirects are enabled for your store, there is no need to create a rewrite when a product URL Key is changed.
Add URL Rewrite for Product
When automatic redirects are enabled and you save a category, all product and category rewrites are generated in real time and stored in rewrite tables by default. This could result in significant performance issues for categories with many assigned products. The solution is to change this default and skip the generation of category/products URL rewrites of products for category save. In this case, product rewrites are generated only for the canonical product URL. See Automatic Product Redirects for more information.
Step 1. Plan the Rewrite
To avoid mistakes, write down the redirect to path and redirect from path and include the URL Key and suffix (if applicable).
If you are not sure, open each product page in your store, and copy the path from the address bar of your browser. When creating a product redirect, you can either include or exclude the category path. For this example, we create a product redirect without a category path.
Product with category path
Redirect to: | gear/bags/impulse-duffle.html |
Redirect from: | gear/bags/overnight-duffle.html |
Product without category path
Redirect to: | impulse-duffle.html |
Redirect from: | overnight-duffle.html |
Step 2. Create the Rewrite
On the Admin sidebar, go to Marketing > Search & SEO > URL Rewrites.
Before you proceed, do the following to verify that the request path is available.
In the search filter at the top of the Request Path column, enter the URL key of the page to be redirected and click Search.
If there are multiple redirect records for the page, find the one that matches the applicable store view and open it in edit mode.
In the upper-right corner, click Delete. When prompted, click OK to confirm.
In the upper-right corner of the URL Rewrites page, click Add URL Rewrite.
Set Create URL Rewrite to .
In the grid, find the product that is the target (destination) of the redirect and click the row.
Add URL Rewrite for a Product
Below the category tree, click Skip Category Selection. For this example, the redirect does not include a category.
Skip Category Selection
The Add URL Rewrite for a Product page displays a link to the target in the upper-left corner, and the Target Path field displays the system version of the path, which cannot be changed. Initially, the Redirect Path field also displays the target path.
If you have multiple store views, set Store to the view where the rewrite applies. Otherwise, a rewrite will be created for each view.
In the Request Path field, replace the default by entering the URL key and suffix (if applicable) of the original product request. This is the redirect from product that you identified in the planning step.
The Request Path must be unique for the specified store. If there is already a redirect that uses the same Request Path, you will receive an error when you try to save the redirect. The previous redirect must be deleted before you can create a new one.
Set Redirect Type to one of the following:
For your own reference, enter a brief Description of the rewrite.
URL Rewrite Information
Before saving the redirect, review the following:
- The link in the upper-left corner displays the name of the target product.
- The Request Path contains the path for the original redirect from product.
When complete, click Save.
The new product rewrite now appears at the top of the URL Rewrites grid.
URL Rewrite Saved
Step 3. Test the Result
Go to the home page of your store.
Do one of the following:
- Navigate to the original redirect from product request page.
- In the address bar of the browser, enter the path to the original redirect from product immediately after the store URL. Then, press Enter.
The new target product appears instead of the original product request.
Field Descriptions
Create URL Rewrite | Indicates the type of rewrite. The type cannot be changed after the rewrite is created. Options: Custom / For category / For product / For CMS page |
Request Path | The product that is to be redirected. Depending on your configuration, the Request Path might include the or suffix, and category. The Request Path must be unique, and cannot be in use by another redirect. If you receive an error that the Request Path already exists, delete the existing redirect, and try again. |
Target Path | The internal path that is used by the system to point to the destination of the redirect. The target path is grayed out and cannot be edited. |
Redirect | Determines the type of redirect. Options: No - No redirect is specified. Many operations create redirect requests of this type. For example, every time you add products to a category, a redirect of the type is created each store view. Temporary (302) - Indicates to search engines that the rewrite is for a limited time. Search engines generally do not retain page rank information for temporary rewrites. Permanent (301) - Indicates to search engines that the rewrite is permanent. Search engines generally retain page rank information for permanent rewrites. |
Description | Describes the purpose of the rewrite for internal reference. |
In the process of redirection, all GET parameters specified in the URL will be removed due to security reasons.
Getting A Products URL
Potentially confusing due to the 3 methods you could use, all of which are in :
Copy
The best way to explain is to simply show the results of several calls. Given a product whose URL key is on the domain of the results are:
Copy
To see what other params can be passed to , see URL Route Parameters.
Using _ignore_category
The short version - I would not use this param, and instead use
If you first fetch a products URL which includes the category, and then use the same product instance to attempt to fetch a non-category URL, you will instead both times get a URL which contains the category, see the below code:
Copy
The issue lies with the key on the model, which the
sets, to act as a cached value for
an otherwise intensive process of resolving a URL rewrite to a product within
a category.
To resolve this, unset first, as below:
Copy
Note that any method listed at the top of this card which causes the category to be present in the returned URL will have the same effect of caching the category.
Magento 2 Unique Product URL
Business Value
Problem: Duplicate content can have a negative effect on your site’s search rankings. You have to make sure each URL on your site is unique. You also have to prevent search engines from indexing content twice.
Solution: Magento 2 Unique Product URL allows you to set up robots meta tags, redirects or canonical tags in order to avoid duplicate URL issues on your site.
How It Works
This feature includes three primary ways of fighting duplicate content: telling crawlers not to index the page, setting up redirects to different pages and adding canonical tags so that crawlers ignore page variations. It also lets you create SEO-friendly product and image URL templates and alt tags.
Main Advantages
Add Robot Meta Tags
These tags let you decide whether crawlers should index a page and follow the links on it. In general, you should block pagination and search results pages.
You can even add an action name instead of a direct URL to apply this option in bulk.
Set up Redirects
Redirects let you move visitors from one URL to another. You should add them if you've had to delete a high-ranking page, for instance if a popular product was discontinued. Instead, you can redirect visitors to that product’s category or brand page. This preserves the original page’s SEO value, too.
Establish Canonical URLs
This feature adds a canonical tag to the page source code. The crawler will go to the original page instead. You can add a single canonical URL to several pages. For instance, you can add a canonical URL that references parent products to child products. That way the former will have all the authority.
Use SEO-friendly Templates for URLs and Alt Tags
You can create human-friendly product URLs with templates based on product attributes. For instance, [product_name]-[product_color]-[product_size]-[product_entity_id] will generate a URL for all products using product name, color, size and ID.
Magento 2 Unique Product URL lets you generate image URLs and alt tags in a similar fashion, too!
FAQ
Why do I need product URLs to be unique?
The main point of making sure your product URLs are unique is to avoid duplicate content. Search engines consider pages with duplicate content to be lower in quality, which leads to them appearing lower in search results.
Hi, I need help with something.
I have a few categories, when I look at frontend, the URL reads like it should "/components/memory-ram/desktop-memory"
But when I go to a product within that category, it reads.
"/catalog/product/view/id/17/s/kingston-8gb-ddr3-1333mhz-value-memory/"
What do I need to do to get "/components/memory-ram/desktop-memory/kingston-8gb-ddr3-1333mhz-value-memory/"
I have double checked my settings.
All these are set to "Yes".
Generate "category/product" URL Rewrites = Yes
Create Permanent Redirect for URLs if URL Key Changed = Yes
Use Categories Path for Product URLs = Yes
These settings have been set to Yes when I first installed Magento 2, it was a clean setup of MG2 so no upgrade from MG1 etc. And these settings were all Yes before I added any products or categories.
Rob
Url magento product
How to Create Product URL Rewrites in Magento 2
The Most Popular Extension Builder for Magento 2
With a big catalog of 234+ extensions for your online store
Find extensions

Creating the Product URL Rewrite means you can change the product link for better SEO and make your site more friendly with the visitors. However, during the rewrite process, you should know what Target Path and Request Path are.
- The Target Path contains the internal URL that is used by the system, with the product ID. It is entered automatically, and grayed out.
- Although the Request Path initially displays the current URL, it is the path that you are requesting.
Due to performance optimization, Magento 2 removed the feature of URL rewrites automatic regeneration. Hence, you have to create it on your own by following these 3 steps:
3 Steps to Create Product URL Rewrite in Magento 2
Step 1: Add the Rewrites
- On the Admin Panel, .
- In the upper-right corner, click on the button.
- From the dropdown list of Create URL Rewrites, choose “For Product” option.
- In the product list that appears instantly, click on the product which needs to be redirected to edit.
- Hit the button, then navigate to the section.
Here, the current product URL is included by the and the shows the internal URL that is used by the system. It is grayed out and not available for editing.
- Set the to apply the rewrites if necessary.
- In the field, insert the new URL key and suffix for the product.
- Convert to Temporary (302) or Permanent (301).
- Leave some description for the rewrite.
And now, you can see the new product rewrite at the top of the list.
Step 2: Update the Index
- On the Admin Panel, .
- Mark the checkbox.
- Choose Reindex Data for the .
- to update the index.
Step 3: Check the Results
Be careful to check the rewrite to ensure that it works perfectly.
Creating Product URL Rewrites in Magento 2 can bring better SEO performance for your store and allows customers to easily identify and revisit the page. In fact, we also have the Better SEO extension - a more complete solution that assists you greatly in the SEO optimization process. Feel free to message us if you need further help with the guide or the extension. Cheers!
Explore Better SEO by Mageplaza
Related posts
Irritation flickers in his voice. - Hydrogen peroxide. Alive.
You will also like:
- Evga and nvidia
- 2017 titan headlights
- Wvutech bookstore
- Ertugrul background
- Ahk if then
- Minecraft villager ai
- Flat landscape illustration
- Personalized corgi gifts
- 2018 f150 tuned
- Neon exterior paint
- Goku gi
At first weakly, and then hitting the leg hard. "Ah well?" I grabbed the maid and led her to the sofa. He sat down on the sofa himself, threw her into his lap. He threw back his skirt and before she had time to recover, slapped on the priest. She screamed and froze.