99% of WooCommerce users would prefer to use beautiful permalinks/slugs for WooCommerce product pages. But also for category pages!
Its possible to have beautiful permalinks/slugs in WooCommerce. The Perfect SEO Url plugin removes the category slug immediately after installation. Easy installation and it works out of the box. Lets find out what this plugin does.
And many of us want prettier permalinks!
To achieve this, we need a nice plugin: Perfect SEO Url for WooCommerce and some small SEO tricks to make it even better.
The installation of the plugin is similar to installing all other WordPress/WooCommerce plugins. After installation the plugin works automatically, you can change some settings if you want.
Some Setup & SEO tricks
The first 2 checkboxes should be activated at all time! Otherwise you will lose ranking.
Its important to check ‘redirect product’ box, because you want that the old product automatic redirects to the new one. This makes sure that Google knows that something has changed. The plugin creates ‘permanent 301 redirects’. This is perfect to let Google know that the page has moved permanently.
Also check the ‘redirect product category’ box. For the same reason.
If you use producttags in WooCommerce, then check ‘redirect product tag + tag support’.
You can also activate the category results box, for showing only products in the category. This is very nice if you want to have a page full with only products instead of categories.
Category product relation can be used when you see a 404 page. (never happend to me…)
Click the Save Changes button, your WooCommerce product page + category page permalinks are now:
In all cases I tested the plugin, it worked like a charm. It is very fast and stable. The plugin is updated in February 2015 and was updated many times as shown in the changelog at the support page. Updates are always available.
In some webshops I noticed a growth in visitors within 3.5 weeks, this is very fast. Product categories and product pages have more visitors when using the plugin. It is also no problem to add new products or categories, because everything remains the same. You don’t even notice the plugin is active when using it.
At this moment? None! But maybe the documentation in the website should be more comprehensive. The plugin is good and does what it says is supposed to do: remove the product and category slug.
It is also very big on the homepage of the Perfect SEO Url website :-) but I think this is the only properly working Woocommerce SEO Plugin. The benefits the plugin gives is worth every 119 dollar.
Free Way That Won’t Always Work
We need a nice plugin : Remove slug from custom post type and some tricks.
After installing this plugin, we go to its settings page:
Click the Save Changes button, your Woocommerce product page permalinks are now :
If you want .html instead of / , simply type in html and save changes.
Now your product page slug should be :
In many cases, this plugin works like a charm, but sometimes it won’t work, especially in latest version of WordPress, as you can see, this plugin is not updated for 2 years….
The most typical problem is :
for old products, the slugs were changed successfully, but we can’t create new products, we would encounter 404 error when opening new product pages !
The solution is simple and quite funny:
Just set the publish time to some time long ago, today is 10th Jan. 2014, I set the publish time to 2013. Save it, your product were now “published long ago”, and you will be able to open the page, no 404 error anymore.
Another typical problem is that:
This plugin applies to all custom post type by default, we can’t exclude it from some other custom post types, like Portfolio (many themes have this sort of custom post type). So solve this, open the .htaccess file on root folder on your site.
# BEGIN REMOVE SLUG CUSTOM POST TYPE RULES RewriteRule ^product /(.+)/$ /$1 [R=301,L] RewriteRule ^product_variation/(.+)/$ /$1 [R=301,L] RewriteRule ^/(.+)/$ /$1 [R=301,L] RewriteRule ^/(.+)/$ /$1 [R=301,L] RewriteRule ^portfolio/(.+)/$ /$1 [R=301,L] # END REMOVE SLUG CUSTOM POST TYPE RULES
As you can see, there are many rules for other custom post types, like product_variation and portfolio. I would like to disable url rewritten for them. So I removed them, this code block becomes:
# BEGIN REMOVE SLUG CUSTOM POST TYPE RULES RewriteRule ^product /(.+)/$ /$1 [R=301,L] # END REMOVE SLUG CUSTOM POST TYPE RULES
Note: Don’t remove the 1st and last 2 lines which begins with #