X-Cart Mods, X-Cart Addons - WebsiteCM
Did you know...
We provide a Must Have X-Cart Mods page to ensure you're making the most of your x-cart.
X-Cart Excellence eZine
Subscribe for proven tips and special discounts!
Cart is empty
X-Cart Services
X-Cart Customization X-Cart Optimization
X-Cart Mods
Recommended Packages Must Have Mods Reseller Program
Filter Mods By Version
Mods By Purpose
X-Cart Administration X-Cart Packages X-Cart Appearance X-Cart Conversion X-Cart Customers X-Cart Integration X-Cart Marketing X-Cart Navigation X-Cart Search X-Cart SEO X-Cart Shopping Feeds X-Cart Upselling X-Cart Templates
Mods By Firm
WebsiteCM BCSE Firetank

WebsiteCM on Twitter

SEO WWW or Not to WWW - Pick a Preference!

SEO WWW or Not to WWW - Pick a Preference!
Category: X-Cart SEO
Posted: Feb 2, 2010
Synopsis: Search engine optimization tip informing seo'rs to pick a www. or non-www. preference. Further provides a tutorial on how to configure x-cart to use the domain preference.

I'm frequently asked whether or not one should use www. (i.e. http://www.example.com/) or (i.e. http://example.com) when optimizing for search engines. It's not going to impact your SEO rankings one way or the other, but search engines will see the url with and without www as two distinct urls, so you should always pick a preference. While "w-w-w" was the buzz word of the 'old' days, it's now an accepted and redundant part of the web, so it would make sense to drop the www; call me a traditionalist though, I just can't do it.

Here's how you configure your x-cart to force a single format.

Set X-Cart Domain Preference

Open your config.php file and look for the $xcart_http_host and $xcart_https_host variables and ensure the domains are input with your desired prefix:

www.

$xcart_http_host ="www.example.com";
$xcart_https_host ="www.example.com";

non-www.

$xcart_http_host ="example.com";
$xcart_https_host ="example.com";

Tell Google

In google webmaster central settings - if you don't have an account its an SEO must to register one - you can set a preferred domain:

The preferred domain is the one that you would like used to index your site's pages. If you specify your preferred domain as http://www.example.com and we find a link to your site that is formatted as http://example.com , we'll treat that link as if it was http://www.example.com . In addition, we'll take your preference into account when displaying URLs in our search results. It may take some time for changes to be reflected in our index.

Preferred domain

Force Domain Preference

In your .htaccess, you can then force to use or not use the www. using the approriate block of code below. Any www or non-www url usage will be automatically redirected to the desired type.

# Force www.
RewriteCond %{HTTP_HOST} ^example\.com [NC]
RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301]

# Force non-www.
RewriteCond %{HTTP_HOST} ^www\.example\.com [NC]
RewriteRule ^(.*)$ http://example.com/$1 [L,R=301]

Related Items


Custom Dynamic Search Engine Optimization (CDSEO) Pro for X-Cart
Must Have X-Cart Mod

CDSEO Pro for X-Cart is the definitive x-cart seo tool, allowing you custom control over your x-cart seo friendly urls, page titles, link anchors, meta keywords, meta descriptions and much more, all from an easy to use seo administration.  Even export/import your seo data to .csv for easy editing!  Also includes an XML SiteMap Generator which generates in just seconds and canonical support for duplicate content control!


Our price: $139.99 save 30%
Custom Dynamic Search Engine Optimization (CDSEO) Pro for X-Cart





Site Map