Get Free Audit

How to Rewrite URL’s in Magento 2.0

Oct 22, 2015

537 Andrey Dubina

How to Rewrite URL’s in Magento 2.0

Today I will explain you how to rewrite URL’s in Magento 2.0.

I’ve created a product and named it “Camera”. The real location of the product is catalog/product/view/id/2075 where 2025 is the ID of the product.

Magento automatically uses the name of the product to generate an URL. And my customers will be able to access the product using the following URL: domain.com/camera.html.

But if I don’t like the automatically generated URL, how can I change it?

Go to Marketing -> URL Rewrites.

1

I find the product in the list and click on it.

Vlad Yunusov
Partner With Us Let's discuss how to grow your business. Get a Free Quote.
Talk to Vlad

2

This is what I see:

3

In Target Path you can see the real location of your product. And Request Path is the path that was automatically generated by Magento.

I change Request Path and write, “camera_example” instead.

I press “Save”.

Now I can access the product using the following URL: domain.com/camera_example.

4

Vlad Yunusov
Partner With Us Looking for a partner that will help you to grow your business? We are the right company to develop your webstore. Feel free to get in touch with us. We will be happy to discuss your business opportunities and provide you with a Free Quote. Talk to Vlad

2 Comments

  1. Thanks for the article. One issue:

    If I am using short string as Request Path (by short I mean string shorter than 53 characters) all works like a charm.

    If my Request path is longer than that I am getting 404

    Is that bug or feature or there is a setting somewhere?

    Witold

Post a new comment

BelVG Newsletter
Subscribe to our mailing list and get interesting stuff and updates to your email inbox.
Email *