cancel
Showing results for 
Search instead for 
Did you mean: 

Seo URL with slashes in magento

Seo URL with slashes in magento

Hi all,

I want format all magento url with slashes.

for example:

domain.com/products?p=1&attributes=value

must became like this:

domain.com/products/p/1/attributes/value

 

How can I do this?

 

Thank you

8 REPLIES 8

Re: Seo URL with slashes in magento

I'm using nginx also

Re: Seo URL with slashes in magento

up

Re: Seo URL with slashes in magento

Hi

Can you give a real URL ? 

 

Your example url doesn't make sense.

 

Products have this URL structure: catalog/product/view/id/243

And can be rewritten to be seo-friendly (url key).

 

 

Maxime Coudreuse, developer of Product Manager for Magento: User-friendly product editor with customizable grid interface and category tree for Magento 1 and 2

Re: Seo URL with slashes in magento

The problem is write url (all types of url) without '?' to delimit parameters.

 

For example, actually if I open a category product view page (category: products) at second page the url is like:

 

domain.com/products?p=2

 

but I want open the same second page with an url formatted in this way:

 

domain.com/products/p/2

 

This url format (with only slashes) have to be used in all type of pages not only in category view pages like the example below, and in generic way with all types of parameters I could pass to the controller, for example filter attributes and so on.

 

Now is more clear?

Thank you

Re: Seo URL with slashes in magento

Here is a detailed instruction of how to format SEO URLs with slashes in Magento:

[Tutorial] Add slashes to SEO URLs in Magento

[ Tigren - Elite Magento E-commerce Solutions Provider - www.tigren.com ]

Re: Seo URL with slashes in magento

Many thanks, I will check if this example works.

Re: Seo URL with slashes in magento

To add slashes in Magento SEO URLs, check your URL rewrite settings and custom URL structures. I used a free audit SEO tool to catch these details on a client’s site—it makes a big difference for clean URLs!

Re: Seo URL with slashes in magento

 

  • Understand Magento URL Rewrites – Magento has a built-in URL rewrite system that allows you to make URLs more SEO friendly by converting query parameters into clean slashes.

  • Use URL Rewrite Module – Enable Magento’s native URL rewrite feature from the admin panel to start controlling how your product and category URLs are formatted.

  • Leverage .htaccess or nginx Rules – If needed, you can write custom rewrite rules at the server level to transform query strings into slash-based paths for better SEO.

  • Configure URL Rewrites in Admin – Go to > SEO & Search > URL Rewrites in the Magento admin, and add rules to match your parameterized URLs to slash-based ones.

  • Enable Search Engine Friendly URLs – Under Stores > Configuration > Web > Search Engine Optimization , make sure “Use Web Server Rewrites” is set to “Yes.”

  • Custom Router Implementation – Developers can create a custom Magento router module to catch query string parameters and rewrite them as slashes for SEO URLs.

  • Modify router.php or Custom Controller – Advanced users can map /p/1/attributes/value directly to the product collection logic, avoiding query strings.

  • Check Canonical URLs – Ensure canonical tags are set up correctly in Stores > Configuration > Catalog > Catalog > Search Engine Optimization to prevent duplicate SEO issues.

  • Flush Cache After Changes – Always clear Magento cache after implementing URL rewrite rules so the new SEO URL structure takes effect.

  • Update Internal Links – Update all internal links and navigation to point to the new slash-based SEO URLs instead of query strings.

  • Test Redirects Properly – Use 301 redirects from old query string URLs to new slash URLs to preserve SEO ranking and avoid broken links.

  • Monitor SEO Performance – After implementation, track your new SEO URLs in Google Search Console and Analytics to ensure crawling and indexing are working correctly.