How to make PrestaShop friendly URLs for free

Surprisingly, PrestaShop does not ship clean URLs by default. However, this is very common in other CMS systems, and hard to imagine a good SEO without them.

What are clean URLs? PrestaShop default product URLs are looking like /en/men/1-1-hummingbird-printed-t-shirt.html or /product.php?id=123&category_id=456 while SEO “standard” would be something more user friendly, like /category/product-name.

PrestaShop does not allow to change URLs easily – extra steps to enforce that are needed.

This article will show how to tweak URLs to get your store better prepared for SEO. In this article, i will also discuss the following:

What is Friendly URL in PrestaShop

In the default PrestaShop setup, you will notice that PrestaShop product URLs (and all other pages) have odd numbers in URLs. Those numbers mean IDs (identifiers) to products, categories, manufacturers, and other pages in the PrestaShop database.

Those numbers are auto generated by PrestaShop.

Numbers you see in PrestaShop site URLs are autogenerated
Numbers you see in PrestaShop site URLs are auto generated.

There is also a .html suffix for some URLs – useless information you might want to get rid of for your user.

But PrestaShop has some limitations to what you can change. In the following sections, I will explore how much you can get for free to boost your PrestaShop store SEO with some URL changes.

Is PrestaShop SEO Friendly

By default, PrestaShop is not optimized for SEO, and some effort is needed to make PrestaShop SEO-friendly.

We have discussed PrestaShop SEO Setup for new sites at length in out blog.

How to enable Friendly URLs in PrestaShop

Whether you are an SEO expert or not – there are many reasons to have friendly URLs for your store. It improves usability, makes URLs shorter to read, and search engines prefer better URLs.

To enable friendly URLs in Prestashop, log into the back office, click Shop Parameters, then Traffic & SEO. In the section Set up URLs, you will see a toggle with the label Friendly URL. Enable that and hit Save.

Enable Friendly URLs in PrestaShop
Enable Friendly URLs in PrestaShop

Should you enable accented URLs in PrestaShop? No. Your URLs should be easy to type and easy to read. For this reason, do not use any special characters in your URLs, including emoji and UTF8/UTF16 characters. Most browsers would display question marks in the URL instead of those particular characters.

There is also an excellent option below mentioned input to configure – you can read about that in a separate article: Redirect to the canonical URL option.

Will PrestaShop Friendly URLs Work In All Servers

Friendly URLs could be enabled on all PrestaShop stores from the back office, but your server must support URL rewriting. URL rewriting in servers is done with a software called mod_rewrite. Fortunately, most servers support that out of the box. It was an issue 10 years ago.

What To Do When PrestaShop Friendly URL Not Working

If you are getting 500 errors on the pages, you are trying to visit, that might mean that the webserver software (mod_rewrite, which is discussed in the section above) is not installed on the server. If so, contact your server provider or just use something that is widely used these days, like A2Hosting.

If pages are returning 404 errors (means “Page Not Found”), then everything is good with the hosting and you can investigate PrestaShop problems.

An obvious and most common solution is to clean up the cache. You can do this quickly by following cache removal article on our blog.

If these do not work, disable friendly URLs, clear cache, remove .htaccess file, which you can find by logging into your FTP, and then enable friendly URLs back again.

How do I force HTTPS in PrestaShop

When talking about SEO and URLs, I would describe HTTPS as a must-have feature for your store.

Google has been enforcing HTTPS URLs for years now, and every shop owner must configure HTTPS. So if your hosting supports HTTPS – go and enable it in your back office → Shop Parameters → General. You will see input Enable SSL – set that one and hit Save.

Enable HTTPS in PrestaShop
Enable HTTPS in PrestaShop

If you can’t enable HTTPS from the backend for some reason, you might want to update two values in your MySQL database. Those are fields PS_SSL_ENABLED and PS_SSL_ENABLED_EVERYWHERE to value 1 in the configuration (ps_configuration) database table.

How to Manage PrestaShop URLs

All settings are related to clean URLs in the back-office under the Shop Parameters → Traffic & SEO → Schema of URLs page.

The Best PrestaShop URLs Configuration
The Best PrestaShop URLs Configuration

On this page, you can change URL format to (almost) anything you want. However, because I worked a lot with SEO in the past 10+ years, here are some settings I advise you to use:

Best PrestaShop URL Schema for Product Page

Default PrestaShop URL Schema for Products is:

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

Here is how the URL will look like:

/men/1-1-hummingbird-printed-t-shirt.html

Drop that .html suffix at the end as it does not add any value to your URL’s readability. Instead, change URL schema to this:

{category:/}{id_product_attribute}-{rewrite}-{id}

Which will make the URL look:

/men/1-hummingbird-printed-t-shirt-1

Not only is this URL shorter, but you bring category and product name to the beginning, making it easier to read and ID – useless information for your user – to the end.

Best PrestaShop URL schema for Category Page

Default URL schema for category page is:

{id}-{rewrite}

Rewrite it to look like this:

{rewrite}-{id}

It will bring standard, readable, category URL like: /clothes-3 .

Which is great!

Best PrestaShop URL schema for All Pages

By default, PrestaShop configures URLs to have ID at the beginning of the URL. Unfortunately, this hurts readability significantly when search engines are cutting too long URLs.

For example, a long URL can be cut to example.org/34356-clothes/6732-... where it would be better to read like this instead: example.org/clothes-34356/men-....

So move {id} param to the end in Schema of URLs inputs as seen in the screenshot below.

Move IDs From PrestaShop URLs Config
Move IDs From PrestaShop URLs Config

Other than that – there is not much you can do with the default PrestaShop setup since most of the keys – are mandatory, and you can’t disable them.

It would be great to drop {id} from all URLs making your store look great. But PrestaShop does not allow to do that without expensive addons.

Do You Need to Purchase PrestaShop Friendly URLs Addon?

As explained above – addons to remove IDs from URLs are expensive. They usually cost about 100 USD, which is a nice amount of money.

Friendly URLs are a must for SEO, but just removing IDs from the URLs won’t do much for your ranking. Content matters the most, while a friendly URL is just a vitamin to your SEO.

So if you are just a beginner/starter – don’t even think about buying such an expensive addon. But if you have a store with 1000 or more products and 100 USD is not that expensive for you – sure, that would be the nice-to-have solution to boost your SEO just a little bit.