SEO & URLs Preferences

The tools on this page help you improve the presence of your PrestaShop site on web searches, and therefore reach more potential customers.

SEO means "search engine optimization". It represents a set of techniques and best practices aimed at improving the visibility of a website on search engines. You can read more about this at Wikipedia: http://en.wikipedia.org/wiki/Search_engine_optimization.

URL is short for "uniform resource locator", or simply put, the online address of a web page. You can read more about what a URL is at Wikipedia: http://en.wikipedia.org/wiki/URL

By default, PrestaShop's deep URLs (that is, specific pages rather than online the domain name) are rather uninformative to both the customer and search engines: a URL such as http://www.myprestashop.com/product.php?id_product=27 does not help visitors know what product is on that page. Friendly URLs are the way to achieve that, and get for instance http://www.myprestashop.com/2-music-players/27-ipod-nano-green.

As you can see in the second example above, both categories and products can have a friendly URL: in the example above, id_category=2 becomes 2-music-players, and id_product=27 becomes 27-ipod-nano-green. While the ID number cannot be removed by default, the words can be either generated from the category/product name, or written by hand. This is done directly in the configuration page for the product or the category (in the Catalog menu): the "Friendly URL" field can be found directly on the main configuration page of a category and under the "SEO" tab of the configuration page of a product.

There are other individual pages in your PrestaShop install that would certainly benefit from friendly URLs: CMS pages, user account pages, pages with automatically generated content... The "SEO & URLs" page presents you with a list of these pages and enables you to edit their friendly URLs as well as their meta tags (title, description, keyword).

Friendly URLs only work with a server setup that supports URL rewriting (through the Apache Web Server mod_rewrite feature, for instance). Make sure to check that your server does (ask your hosting provider!), as it can make your shop completely unavailable to customers if you enable friendly URLs and the server does not support it!

In order to change the homepage meta tags, you simply need to open the "SEO & URLs" page, open the "index" page's settings, and there you can freely edit some important SEO information.

A few tips:

  • The default homepage title is the name of the store, and therefore the index' title field is empty. If you put content in the field, the homepage's full title will be "<your content> – <the name of the store>".
    The name of the store itself is set during the installation of PrestaShop, and can be changed from the "Store Contacts" preference page, using the "Shop name" option of the "Contact details" section.
  • Keep your description short: a paragraph of text is enough.
  • To add a meta keyword, click in the "Add tag" field and validate by pressing return. You can remove tags by clicking the cross.
  • You do not have to add a rewritten URL if there is already one.

Note that if your store has already been indexed by Google or any other search engine, it might take a while for your changes to appear in the search results. Please be patient.

At the bottom of the "SEO & URLs" page are three sections with additional options: Set up URLs, Set shop URL, and Robots file generation. See below for an explanation of these.

Adding a New Friendly URL

Friendly URLs are to be set in the configuration page of each product, category, static content page... This creation page is only useful for some automatic pages, and most of the time you won't have to worry about these.

Make sure to fill the fields for all the available languages on your shop: not only is it immensely useful to local users, but some search engines can even make use of this local information.

Click the "Add new page" button to reach the friendly URL creation form. It has a handful of fields:

Set up URLs

The main options for friendly URLs:

In previous versions of PrestaShop, you had to manually generate a new .htaccess file after having enabled friendly URLs. This is no longer the case since version 1.5: the .htaccess file is now silently managed by PrestaShop, and you do not have to worry about it.

Set shop URL

In this section, you can view and edit some of the default server settings:

Most of the time, you should not touch these fields without knowing exactly what you are doing. One mistake could break your shop.


Schema of URLs

New in 1.6.

You can change the way friendly URLs are generated, by changing the route to a resource on your shop.

For instance, the default route to display a product's page is {category:/}{id}-{rewrite}{-:ean13}.html, which results in /summer-dresses/7-printed-chiffon-dress.html
You could change that route to {manufacturer:/}{id}-{rewrite:/} to obtain /fashion-manufacturer//7-printed-chiffon-dress/

8 fields are available by default, and each is accompanied with a list of available keywords. Some keywords are mandatory and are indicated with a *.

Once you have updated your fields, do not forget to save your changes, then on the "Save" button in the "Set up URLs" section in order to regenerate your .htaccess file, which is necessary for your friendly URLs.

Robots file generation

robots.txt file enables you to block specific automated bots and web spiders which crawl the Web in order to find more web pages to add to their company's servers. Some bots you want to have full access to your website, such as Google's or Yahoo!'s, and some others you would rather not, such as spam bots, content thieves, e-mail collectors, etc. Note that the worst of bots do not respect this file's directives, as it is purely advisory.

PrestaShop's robots.txt generation tool simply creates a file with exclusion directives for files and directories that are not meant to be public, and should not be indexed. These directives apply to all bots, good or bad: the generated file uses the "User-agent: *" string.

Clicking on the "Generate robots.txt" button replaces any existing robots.txt file with a new one. Therefore, if you want to add your own rules, do it after PrestaShop has generated its version of the file.