Skip to main content

SEO-friendly URL aliases in X-Cart 5.4.x

Learn how to configure custom Clean URLs.

Written by Olga Tereshina

This article applies to X-Cart 5.4.x. In X-Cart 5.5.1.x and 5.6.x, aliases are defined in the x_cart.clean_urls.aliases section of the store’s YAML configuration instead of etc/config.php.

You can set custom Clean URLs for particular pages like target=bestsellers or target=contact_us (only in the Customer area).

To do so, use the [clean_urls_aliases] section of the file XCART_DIRECTORY/etc/config.php.

This section allows you to add key-value pairs to set SEO-friendly URLs:

[clean_urls_aliases]
; Add clean URL aliases for special pages.
; Use the following format:
; target = "clean-url"
new_arrivals = "newarrivals"
sale_products = "sale-products"
coming_soon = "coming-soon"
bestsellers = "bestsellers"
contact_us = "contact-us"
brands = "all-brands"


Depending on the version of X-Cart you are using, the [clean_urls_aliases] section may look slightly different but supports the same formatting for the key-value pairs.

Related pages:

Did this answer your question?