How to Enable SEO URLs in PrestaShop 1.6.x
PrestaShop by default doesn't have search engine friendly URLs enabled but enabling this feature is actually quite easy and in this tutorial I show you how it's done. Now for those of you that aren't familiar with what this does, here is an example:
A store search engine friendly URLs disabled looks like this:
While a store with search engine friendly URLs enabled looks like this:
For those of you that don't understand how this helps, I actually have an article on search engine optimization here (take a look at the "URL rewrites" section for more details). Now for those of you that are ready to enable this feature, you can watch the how to video below:
Can't view the video? Watch it on YouTube
Enabling SEO URLs:
Start by going to your admin panel and then go to "preferences" and "SEO & URLs".
Now in the "set up URLs" section, PrestaShop will tell you that you need to add a ".htaccess" file to the root directory that PrestaShop is installed in. After creating the file, change the permissions of the file to "666" which is what is recommended by PrestaShop.
Then make sure that "yes" is selected for "friendly URL".
As for "accented URL", this only needs to be enabled if you are using accented characters. So if your site is in English, you do not need to turn this on.
Then click on "save" for the changes to take effect.
Afterwards you will see that some other options which have been made visible and these options include "disable apache's multiview option" and "disable apache's mod_security module" which only need to be enabled if you are experiencing problems with PrestaShop so I recommend testing your store prior to enabling these two options.
Then in the "set shop URL" section, if your "shop domain" differs from the one shown by Prestashop, you will want to change it and the same goes for "SSL domain".
As for "base URI", you will want to leave "/" if your store is located in the root directory. Now if you have PrestaShop installed in a subdirectory such as "store", you will want to change the "/" to "/store/".
After making any changes, remember to click the "save" button.
Adding and removing URL values:
As for "schema of URLs", here you can modify the format of your URLs. For example, you can add and remove some values from the URL, but remember to leave values that have an asterisk (*) next to them in tact.
For example on the "route to products" which looks like this by default:
PrestaShop shows the message:
"Keywords: id*, rewrite, ean13, category, categories, reference, meta_keywords, meta_title, manufacturer, supplier, price, tags".
Which means we can remove the values "rewrite", "ean13" and "category".
We can also add: "price" , "reference" and the other values which have been listed.
But we must keep the value "id" since it's required due to the value being marked with an asterisk (*).
So if we were to remove the "ean13", we would remove it like so:
Now if you'd like to add the price after the rewrite (which is the title of your product) and separate it with a hyphen (-), you would do so like this:
As you can see, I added the price inside of a left and right curly bracket and added a colon (:) after the hyphen (-) because the colon (:) is used to separate the keyword and hyphen.
After making the changes, remember to click the "save" button for the changes to take effect.