• WEBSITECM IS NOW
    Smack Digital Inc.

X-Cart SEO Urls: Don't Slash Away Your X-Cart SEO Rankings

Posted by and last updated Jun 12, 2014 05:34 PM

Informative X-Cart SEO article on utilizing slashes in X-Cart SEO urls.


Google Webmasters recently provided a tutorial on utilizing slashes in urls: To Slash or not to slash.

If using our CDSEO for X-Cart search engine optimization X-Cart mod or the default X-Cart clean urls, you likely have folder urls for categories and/or manufacturers, and you may or not be utilizing slashes correctly.

Search engines will see a url with a slash as a folder, and without a slash as a file, as follows:

http://www.example.com/some-directory <- file
http://www.example.com/some-directory/ <- folder

What's more important than which method is used, is that both of these urls not be used to access the same content. Instead you want pick one url format and 301 redirect the secondary url to the primary.

I recommend using the conventional folder format as provided by CDSEO. You can then ensure that the the url without a slash is 301 redirected to the url with a slash using this code at the top of your .htaccess file:

# WCM - Force trailing slashes
RewriteEngine on
RewriteCond %{REQUEST_URI} ^/[^\.]+[^/]$
RewriteRule ^(.*)$ http://%{HTTP_HOST}/$1/ [R=301,L]
# / WCM - Force trailing slashes

Test the url both with and without the slash at http://web-sniffer.net/ to ensure your response codes are as follows:

http://www.example.com/some-directory -> Status: HTTP/1.1 301 Moved Permanently
http://www.example.com/some-directory/ -> Status: HTTP/1.1 200 OK

You can see this working on our site by testing the following urls:

http://www.websitecm.com/x-cart-mods/x-cart-seo
http://www.websitecm.com/x-cart-mods/x-cart-seo/

About the Author

Jonathan Peters Jonathan's founder of Smack Digital, a digital strategy agency that creates and executes online business success for executives who are highly motivated to quickly increase their market share. With more than two decades of experience on the web for clients ranging from non-profits to billion dollar enterprises, Jonathan's an expert in web development, eCommerce, software programming, search engine optimization and social media marketing.
We choose our clients selectively.
Let's talk success. Apply to work with us.
Apply toWork With Us
Apply toWork With Us