Blog navigation keyboard_arrow_down

Blog Rss rss_feed

Optimizing URL Structure in PrestaShop: Why and How to Set Up Your URL Scheme

Optimizing URL Structure in PrestaShop: Why and How to Set Up Your URL Scheme

In the world of e-commerce, where user convenience and search engine ranking play critical roles, properly configured URLs are essential for driving traffic and successful promotion. In PrestaShop, the URL scheme settings allow you to improve the structure of links on your site, making them SEO-friendly (also known as Friendly URLs). This article provides an in-depth look at why and how to use this setting, complete with examples to simplify the implementation.

What is a URL scheme, and why is it needed?

The URL scheme is a structure used to generate links to pages in your online store. In PrestaShop, you can find this setting under "Traffic & SEO," where you can customize URL templates for products, categories, brands, suppliers, pages, and other elements of your store.

URL scheme settings in PrestaShop serve two main purposes:

  1. Improves SEO: Friendly URLs are easier for search engines to index, enhancing site visibility.
  2. Improves user experience: Readable URLs help users understand the content of a page, boosting trust and improving perception of the site.

Key requirements before changing your URL scheme

Before configuring, ensure your site meets these requirements:

  • Enable the Friendly URL function (found in the "URL Settings" section).
  • Activate URL rewriting — the Apache mod_rewrite module must be enabled on the server.
  • Include all mandatory keywords marked with an asterisk *.

The URL structure is built using keywords in braces {}, such as {id} and {rewrite}. You can also add text before or after keywords if they are not empty, using the syntax {prepend:keyword:append}. For example, {-hey-:meta_title} will add “-hey-” before the meta-title if it is set.

Examples of URL Setup in PrestaShop

1. Product Path

Template: {category:/}{id}{-:id_product_attribute}-{rewrite}{-:ean13}.html

  • Keywords:
    • id*: product ID.
    • id_product_attribute*: product attribute, such as color or size.
    • rewrite*: URL part created from the product's meta-title.
    • ean13: international barcode.
    • category: category path associated with the product.

Example: /electronics/1234-567-product-name-8901234567890.html

In this URL, /electronics/ is the product category, 1234 is the ID, 567 is the attribute, product-name is the product title, and 8901234567890 is the EAN-13 code. This structure helps search engines and users quickly understand the content of the page.

2. Category Path

Template: {id}-{rewrite}

  • Keywords:
    • id*: category ID.
    • rewrite: meta-title for the category displayed in the URL.

Example: /123-electronics

Here, 123 is the category ID, and electronics is its name, making this URL both user-friendly and SEO-friendly.

3. Supplier Path

Template: supplier/{id}-{rewrite}

  • Keywords:
    • id*: supplier ID.
    • rewrite: supplier name displayed in the URL.

Example: /supplier/78-acme-corp

In this case, 78 is the supplier ID, and acme-corp is its name.

4. Brand Path

Template: brand/{id}-{rewrite}

  • Keywords:
    • id*: brand ID.
    • rewrite: brand name.

Example: /brand/45-nike

This URL refers to the brand Nike, immediately showing that it represents branded products.

5. Page Path

Template: content/{id}-{rewrite}

  • Keywords:
    • id*: page ID.
    • rewrite: page name.

Example: /content/101-about-us

In this case, 101 is the ID for the "About Us" page, and about-us is the page name, which is understandable to users and search engines alike.

6. Category Page Path

Template: content/category/{id}-{rewrite}

  • Keywords:
    • id*: category page ID.
    • rewrite: category name.

Example: /content/category/5-blog

Here, 5 is the ID for the blog category, and blog is the name, making navigation clear and intuitive.

7. Module Path

Template: module/{module}{/:controller}

  • Keywords:
    • module*: module name.
    • controller*: controller name.

Example: /module/feedback/form

This URL points to a module named “feedback” and its controller “form.”

Important Points for URL Configuration

  • Always include mandatory keywords for each URL category.
  • Keep in mind that changing the URL structure may result in broken links, so use redirects if necessary.
  • Test new URLs to ensure they work correctly before saving changes.

The URL scheme in PrestaShop is a powerful tool that allows you to adapt links for SEO and enhance the user experience. By applying different keywords and customizing URL structure, you make your online store more appealing and easier to find. Consider which URLs will be most useful for your site, and follow the recommendations above to avoid mistakes.

Was this blog post helpful to you?

    
No comments at this moment
close

Checkout

close

Favourites