IMHO, every website should work both with or without the www, and it has nothing to do with MODx...
First way to do it is setting up Apache’s
virtualhost,
Check
http://www.webdeveloper.com/management/manage_fix_www.html
or this :
http://aplawrence.com/foo-web/www-domains.html
Beware that the VirtualHost method though has SEO drawbacks, and it might be better to go with
the second method 301 redirect, in .htaccess (code from
no-www.org) :
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www\.domain\.com$ [NC]
RewriteRule ^(.*)$ http://domain.com/$1 [R=301,L]
Great article on the subject :
http://www.mattcutts.com/blog/seo-advice-url-canonicalization/
.: COO - Commerce Guys - Community Driven Innovation :.
MODx est l'outil id
David,
I read the article you recommended -- good stuff, thanks. But I am still confused, why would you *not* just use Apache’s ServerAlias directive to answer to both domain.com and www.domain.com on the same site? How does that mess up SEO stuff?
Victor
-
☆ A M B ☆
- 24,524 Posts
No, the config variables are generated at run-time for each page requested. So if the page is requested as www, then the config variables will be for www.
From a pure SEO standpoint, yes, you would really be better off to pick the format you want and force everything to it with a 301 redirect....
www.somedomain.com
somedomain.com
These are seen as different so you are potentially splitting traffic.
|
Identity Developments delivers SEO focused web design and web presence services
- it's not about websites, it's about your identity. |
-
☆ A M B ☆
- 24,524 Posts
Another time I’ve seen this make a difference was an ecommerce application, where the SSL certificate was registered to domain.com, so anyone going to the secure part of the checkout with a www.domain.com url would get the browser warnings. Now all the internal links were relative as is usual for MODx, so would have the www depending on how the customer entered the site. And the top Google links were to www.domain.com.