Search engine friendly (SEF), human-readable or clean URLs are URLs that make sense to both humans and search engines because they explain the path to the particular page they point to. Using SEF URLs you can convert the standard URLs such as:
to their SEO equivalent:
OpenCart 2 SEO friendly URLs require mod_rewrite and rewrite rules which are included in the OpenCart 2 .htaccess file.
mod_rewrite and OpenCart 2 SEO URLs are fully supported on all FastCometOpenCart 2 Hosting plans. If you experience any difficulties to activate this feature for your store, please contact our technical support for assistance.
To activate the OpenCart 2 SEO URLs on your store, please follow the steps below.
STEP 1Configure your OpenCart 2 .htaccess file
By default OpenCart 2 installation archive contains a file called .htaccess.txt. This file contains all the necessary rewrite rules to have the SEO URLs working. First, you will need to rename the file and change its name from:
Please mind the dot ‘.’ before the name of the file, you should not remove it from the name but only the ‘.txt’ extension of the file. You can rename this file both on your local computer and upload the file later or directly on your hosting account via FTP or using your hosting account control panel. For more information on how to upload and modify on your account via FTP, please refer to our FTP Tutorial.
Additionally, if your OpenCart 2 store is located under a subdirectory of your account you will need to edit the RewriteBase like in the .htaccess file. To do so, please open the .htaccess file on and locate the following line:
In case your store is under the root of your domain name (ex: example.com) you do not need to change this line. However, if your OpenCart 2 is installed under a subfolder (ex: example.com/store/) you will need to modify the line to:
When you have the correct RewriteBase set, please save the file and make sure it is properly uploaded under the root of your OpenCart 2 web directory.
STEP 2Activate the SEO URLs via the OpenCart 2 Admin
To finalize the process, please login your OpenCart 2 admin dashboard and refer to the Settings section via the navigation menu.
From the store list, please click on the edit icon and refer to the Server tab from the top navigation.
From the Server tab locate the ‘Use SEO URLs’ radio button and set it to ‘Yes’. When you are ready with your configuration settings save your changes and check your OpenCart store frontend to make sure that the SEO URLs are properly working.
In case you experience any difficulties, please verify that your .htaccess file is properly uploaded under the OpenCart 2 installation directory and the correct RewriteBase is set in the file.