New website or upgrading an existing one? Book a free video consultation.
Englishen
Login Configurator

SEO-friendly URLs

A URL is the web address of a page. A friendly, readable URL helps the visitor and the search engine understand what the page is about, and it also appears in the results. In a store it is worth setting a sensible address structure and - even more importantly - keeping it stable. Below is how a URL should look, how long it should be, what to watch for when changing it, and how to handle it in Magento.

What a good URL should look like

  • Short and descriptive: with the main keyword, so the address itself reveals what the page is.
  • Hyphens between words: separate words with hyphens (-), not underscores or spaces.
  • Lowercase only: on some servers addresses are case-sensitive, so lowercase prevents 404 errors and duplicates.
  • No special characters or parameters: no diacritics, special symbols, session IDs, or unnecessary parameters.
  • Shallow structure: at most 3 to 4 levels of depth; overly long paths dilute authority and confuse.

Include the keyword, but without stuffing - the URL should be readable to a human.

Interesting: URL length

URL length is one of the more researched details. A large-scale analysis (11.8 million results) showed that URLs in position 1 are on average about 9 characters shorter than those in position 10, and the average URL among the top ten measures about 66 characters. Shorter URLs also have a higher click-through rate, and URLs that contain the searched keyword attract up to about 45 percent more clicks than those without it.

To be fair, it should be added: Google explicitly says that the length of a URL and the number of slashes do not directly affect ranking - the link between short URLs and better ranking comes mainly from other factors. Length is therefore not a lever worth obsessing over; the goal is simple - a short, descriptive address with the keyword (recommended up to about 60 characters or 3 to 5 words) for readability, clicks, and a nicer display in the results.

An example: instead of store.com/products/category-5/subcategory/product-id-12345?ref=menu, prefer store.com/running-shoes-nike-air.html.

Stability is key

Once a URL ranks and gathers links, do not change it without need. If you must change it, always set a permanent redirect (301) from the old to the new address - this preserves link equity and avoids broken links and 404 errors. Changing a URL without a redirect is one of the most common sources of lost traffic.

How to handle it in Magento

Every product and category has a url key field, from which Magento builds the address (usually with a .html suffix). Two settings matter here:

  • "Create Permanent Redirect for URLs if URL Key Changed" should be Yes: this way Magento automatically creates a 301 redirect from the old address whenever a url key changes - turn this on without fail.
  • "Use Categories Path for Product URLs": this adds the category path to the product address (store.com/category/product.html). It lengthens addresses and makes the product reachable via several paths - a source of duplicate addresses. It is often better to have it off, so the product has a single, stable address regardless of the category.

Addresses are managed by the URL rewrites module; after major changes you regenerate them if needed.

How to measure whether it is tidy

With a crawler check whether there are any overly long, duplicate, uppercase, or parameter addresses and fix them. After every url key change, verify that the 301 redirect really exists. The goal is simple: short, readable, stable addresses with one path to each page.

Sources

Frequently Asked Questions

What is a good, friendly URL?

Short (up to about 60 characters) and descriptive, with the main keyword; words separated by hyphens (-), lowercase only, no diacritics, special characters, session IDs, or unnecessary parameters; a shallow structure (at most 3 to 4 levels of depth). Include the keyword naturally, without stuffing - the URL should be readable to a human. Such an address also slightly raises clicks, since the visitor reads relevance from it.

Do shorter URLs really rank better?

Only indirectly. A large-scale analysis (11.8 million results) showed that URLs in position 1 are on average about 9 characters shorter than those in position 10 (the average URL among the top ten measures about 66 characters), and shorter URLs also have a higher click-through rate; URLs that contain the searched keyword attract up to about 45 percent more clicks. But Google explicitly says that length and the number of slashes do not directly affect ranking - the link comes from other factors. Length is therefore not a lever to obsess over; the goal is simple: a short, descriptive address with the keyword (up to about 60 characters or 3 to 5 words) for readability and clicks.

Why should I not change addresses, and what if I must?

Once a URL ranks and gathers links, do not change it without need. If you must change it, always set a permanent redirect (301) from the old to the new address - this preserves link equity and avoids broken links and 404 errors. Changing a URL without a redirect is one of the most common sources of lost traffic.

Should I include the category path in the product address?

Often no. The "Use Categories Path for Product URLs" setting adds the category path to the product address (store.com/category/product.html), which lengthens addresses and makes the product reachable via several paths - a source of duplicate addresses. It is often better to have it off, so the product has a single, stable address regardless of the category. This also makes it easier to keep things stable and avoid duplicate content.

How do I set up redirects in Magento and how do I check the addresses?

In the settings turn on "Create Permanent Redirect for URLs if URL Key Changed" to Yes - this way Magento automatically creates a 301 redirect from the old address whenever a url key changes, which preserves link equity and prevents 404 errors (one of the most important SEO settings). Then, with a crawler, find overly long, duplicate, uppercase, or parameter addresses, and after every change verify that the 301 redirect really exists (via the URL rewrites module). The goal: short, readable, stable addresses with one path to each page.

Stop browsing. Start selling. Contact me now at anze@degriz.net.

Access Premium Content for Free

Subscribe to our newsletter and get free access to premium content. Discover valuable insights and exclusive resources available only to our subscribers.

Privacy Policy: Newsletter Subscription

By entering your email address, you are subscribing to the newsletter, through which Degriz will inform you about new online and in-store offerings, marketing activities, and other promotions.

By subscribing to the newsletter, you are also enrolled in the benefits database that Degriz offers to its users.

For the newsletter subscription, Degriz d.o.o. collects the following information: email address, IP address, and if you subscribe as a registered member, your name, surname, address, and phone number.

After submitting the form with your email address, you will receive a confirmation message at the specified address – by confirming this, you will be subscribed to the Degriz newsletter until you unsubscribe (so-called opt-in approval). You can request, in writing or by clicking the Unsubscribe button in the newsletter, that the data controller permanently or temporarily stops using your personal data for direct marketing purposes. Your request will be fulfilled within 15 days of receiving it, as prescribed by law. You can also request the transfer or access to your data.

Degriz d.o.o. is committed to protecting your data in accordance with the legislation governing personal data protection.

The sender of the newsletter and controller of your personal data is: Degriz, d.o.o., Gorica pri Šmartnem 45a, 3000 Celje, SI 67287743

Check out the full Privacy Policy

Newsletter

My name is Anže, and I am a Magento certified expert in solutions and a creator of multiple award-winning online stores.

I am the architect behind all Degriz projects. You will surely come across me if we collaborate. Even though the phone keeps ringing, you can always tap me on the shoulder if you need advice regarding online stores and their functioning.

I specialize in building custom online stores and I am a master of unique techniques to enhance conversion on your website.

© 2010 - 2026 Degriz. All rights reserved. Built with love on Magento.
Partial use of the content is permitted with mandatory attribution. The content is licensed under Creative Commons Attribution 4.0 International (CC BY 4.0) or under our own license.