Here in this post I will be showing you guys how to make your Opencart Urls SEO friendly , this will help you in getting better rankings in search engines and will help boost your page to better places in Google or Bing or any other search engine. So now get to the work
There will be certain things we need before going to make the change
- Opencart on a server.
- Access to Opencart files via ftp.
- An ftp client to connect to the server ftp(you can download filezilla if you don’t currently have one).
Change the name of the “htaccess” file :
In your Opencart folder on your server you currently have a htaccess.txt file in which you need to remove the .txt from the name, this file allows opencart to be able to change and rewrite server URLS to make them SEO friendly. You need to change the filename from “htaccess.txt” to “htaccess”
For stores installed in a subdirectory:
Now if your store is not installed in the subdirectory and is installed in the root of your domain then you can skip this section completely. But if your store is in the subdirectory of your domain then you will have to do one extra step in order to fix your URLS and make them SEO friendly opencart URLS.
Now you need to again open your FTP and then you need to change something in the .htaccess file. If you are using filezilla then to edit the file you can explore and get to the required file and then right click on it and then you can click on edit/view option. This option will open the file in your text editing program so that you can edit it. After editing the file you will be required to save it and filezilla will ask for uploading it back to the server. You can click on the okay button and the file will be edited. For any other FTP browser you can download the file, edit it , save it, upload it back again and replace the original file.
Now in the file you need to look for this:
# If your opencart installation does not run on the main web folder make sure you folder it does run in ie. / becomes /shop/
RewriteBase /
RewriteRule ^sitemap.xml$ index.php?route=feed/google_sitemap
And then you need to change this to
# If your opencart installation does not run on the main web folder make sure you folder it does run in ie. / becomes /shop/
RewriteBase /store/
RewriteRule ^sitemap.xml$ index.php?route=feed/google_sitemap
Tweak Opencart settings to use SEO friendly URLS:
So the last thing you need to do is tweak your opencart settings to get the SEO friendly URLS in your shop. To do that you need to login to your admin panel then you need to click on system=>settings=>edit=>server tab and then in the server tab you can choose the YES option against Use SEO URLS.
Thanks for reading and feel free to ask any question in the comment section below.
