![]() |
|
|||||||
|
|
Thread Tools | Display Modes |
|
#1
IP: 112.87.93.182
|
|||
|
|||
|
I'm frequently asked whether or not one should use www. (i.e. http://www.glassespeople.com/) or (i.e. http://glassespeople.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. Code:
$xcart_http_host = 'www.glassespeople.com' $xcart_https_host = 'www.glassespeople.com' Code:
$xcart_http_host = 'glassespeople.com' $xcart_https_host = 'glassespeople.com' Force Domain Preference In your .htaccess, you can then force to use or not use the www. using the appropriate block of code below. Any www or non-www url usage will be automatically redirected to the desired type. www. Code:
# WCM - Force www.
RewriteCond %{HTTP_HOST} ^example\.com [NC]
RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301]
# / WCM - Force www.
Code:
# WCM - Force non-www.
RewriteCond %{HTTP_HOST} ^www\.example\.com [NC]
RewriteRule ^(.*)$ http://example.com/$1 [L,R=301]
# / WCM - Force non-www.
|
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|