♥peterpil19 Posted March 18, 2006 Posted March 18, 2006 Hi all, Oscommerce internal links generally miss the "www" in the url. e.g. http://domain.com rather than http://www.domain.com Google treats these differently and thus gives each a different page rank. My store has a pagerank of 3 for http://greekandromancoins.com but only a pagerank of 2 for http://www.greekandromancoins.com My question is: which way should we market the url? i.e. is there any reason why I should change the way oscommerce treats its urls so that it includes the www? Any advice is appreciated, Peter CE PHOENIX SUPPORTER Support the Project, go PRO and get access to certified add ons Full-time I am a C-suite executive of a large retail company in Australia. In my spare time, I enjoying learning about web-design. Download the latest version of CE Phoenix from gitHub here
boxtel Posted March 18, 2006 Posted March 18, 2006 Hi all, Oscommerce internal links generally miss the "www" in the url. e.g. http://domain.com rather than http://www.domain.com Google treats these differently and thus gives each a different page rank. My store has a pagerank of 3 for http://greekandromancoins.com but only a pagerank of 2 for http://www.greekandromancoins.com My question is: which way should we market the url? i.e. is there any reason why I should change the way oscommerce treats its urls so that it includes the www? Any advice is appreciated, Peter Oscommerce internal links generally miss the "www" in the url. are you sure? Treasurer MFC
Jack_mcs Posted March 18, 2006 Posted March 18, 2006 Oscommerce internal links generally miss the "www" in the url. e.g. http://domain.com rather than http://www.domain.com If the www is not displaying as you wish, then the configure file is not setup correctly. My question is: which way should we market the url? i.e. is there any reason why I should change the way oscommerce treats its urls so that it includes the www?It makes no difference to the SE's but whicheve you chose, you need to be consitent for the problem you mentioned. Jack Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons
♥peterpil19 Posted March 18, 2006 Author Posted March 18, 2006 Thanks Jack, Your answer was pretty logical. As google treats both differently (for example, google complains that my sitemaps contain wrong urls if the urls miss the "www" but the sitemap location described contains the "www". I've changed the configure.php so that it contains the "www". I'll have to make sure that I am consistent with links so that I don't split up the page rank between the two. Thanks again, Peter CE PHOENIX SUPPORTER Support the Project, go PRO and get access to certified add ons Full-time I am a C-suite executive of a large retail company in Australia. In my spare time, I enjoying learning about web-design. Download the latest version of CE Phoenix from gitHub here
jon_l Posted March 24, 2006 Posted March 24, 2006 Google also treats http://www.domain.name/ and http://www.domain.name/index.php differently. Which I guess makes sense, but I've always found it surprising that Google can't put two and two together and figure out that they are the same page - there is a pretty limited number of default pages that sites generally use. Jon.
Guest Posted March 27, 2006 Posted March 27, 2006 >Google also treats http://www.domain.name/ and http://www.domain.name/index.php differently. That usually only happens if you cause it to. When your intenral links point to the home page, dont link to www.domain/index.php, instead just link to www.domain.com/
Guest Posted March 27, 2006 Posted March 27, 2006 Google also treats http://www.domain.name/ and http://www.domain.name/index.php differently. This will help Removing index.php when browsing back to main page
Guest Posted March 27, 2006 Posted March 27, 2006 You are correct in that the canonical versus non-canonical address will "split" the pagerank (which BTW is a proprietary metric used by Google only). This can easily be solved by using an htaccess rewrite rule assuming you are on a *NIX based server. Add this bit of code to your htaccess file and be sure to change "domain.com" to your actual domain: Options +FollowSymLinks RewriteEngine On RewriteBase / RewriteCond %{HTTP_HOST} www\.domain\.com [NC] RewriteCond %{SERVER_PORT} ^80$ RewriteRule ^(.*) http://domain.com/$1 [L,R=301] RewriteCond %{HTTP_HOST} www\.domain\.com [NC] RewriteCond %{SERVER_PORT} ^443$ RewriteRule ^(.*) https://domain.com/$1 [L,R=301] The above code will act as a PageRank "funnel" and send 301 headers to the non-WWW version of the address. Over time this will consolidate the PR and eventually combine the split rank.
♥peterpil19 Posted March 31, 2006 Author Posted March 31, 2006 Thank you kindly for the tip Devx. My assumption was also confirmed on a blog of a google employee who stated that canonical urls are in fact indexed and treated separately (including for pagerank!). His suggestion was exactly what you said, to create permanent 302 redirects. Here is the code I ended up using. It's basically the same as the one posted above, but I couldn't get that version working for some reason. [/font] [font="Courier New"][font="Courier New"]# For use in document-root .htaccess # Enable mod_rewrite (Required on some but not all server configurations; May cause an error if not needed) Options +FollowSymLinks # Turn on the rewriting engine RewriteEngine on # If request Host header is non-blank (HTTP/1.0 requests don't send this header and can't be redirected based on it) RewriteCond %{HTTP_HOST} . # And if requested domain is NOT the canonical domain RewriteCond %{HTTP_HOST} !^www\.example\.com # Redirect to requested page in canonical domain RewriteRule (.*) http://www.example.com/$1 [R=301,L] [/font][size="2"][color="#000000 size=2"] [/color][/size] # For use in document-root .htaccess # Enable mod_rewrite (Required on some but not all server configurations; May cause an error if not needed) Options +FollowSymLinks # Turn on the rewriting engine RewriteEngine on # If non-canonical domain requested (case-insensitive compare) RewriteCond %{HTTP_HOST} ^example\.com [NC] # Redirect to requested page in canonical domain RewriteRule (.*) http://www.example.com/$1 [R=301,L] [/font] [font="Courier New"] Incidently, I don't know why when I posted, the font tags were included as part of the code. Perhaps I'm using the code tag incorrectly, in which case please forgive me. Regards, Peter CE PHOENIX SUPPORTER Support the Project, go PRO and get access to certified add ons Full-time I am a C-suite executive of a large retail company in Australia. In my spare time, I enjoying learning about web-design. Download the latest version of CE Phoenix from gitHub here
kitchenniche Posted March 31, 2006 Posted March 31, 2006 You are correct in that the canonical versus non-canonical address will "split" the pagerank (which BTW is a proprietary metric used by Google only). This can easily be solved by using an htaccess rewrite rule assuming you are on a *NIX based server. Add this bit of code to your htaccess file and be sure to change "domain.com" to your actual domain: Options +FollowSymLinks RewriteEngine On RewriteBase / RewriteCond %{HTTP_HOST} www\.domain\.com [NC] RewriteCond %{SERVER_PORT} ^80$ RewriteRule ^(.*) http://domain.com/$1 [L,R=301] RewriteCond %{HTTP_HOST} www\.domain\.com [NC] RewriteCond %{SERVER_PORT} ^443$ RewriteRule ^(.*) https://domain.com/$1 [L,R=301] The above code will act as a PageRank "funnel" and send 301 headers to the non-WWW version of the address. Over time this will consolidate the PR and eventually combine the split rank. Hi, I used the above code but what it did the following: When i typed in http://www.domain.com it redirected to http://domain.com ??? HIM - Dark Light - Out on 26/09/05
♥toyicebear Posted March 31, 2006 Posted March 31, 2006 Hi, I used the above code but what it did the following: When i typed in http://www.domain.com it redirected to http://domain.com ??? Thats also what he stated in his description of what it would do...if you wish it to work the other way around just reverse the logic..... Basics for osC 2.2 Design - Basics for Design V2.3+ - Seo & Sef Url's - Meta Tags for Your osC Shop - Steps to prevent Fraud... - MS3 and Team News... - SEO, Meta Tags, SEF Urls and osCommerce - Commercial Support Inquiries - OSC 2.3+ How To To see what more i can do for you check out my profile [click here]
gnuffo1 Posted April 3, 2006 Posted April 3, 2006 I reversed it, to this: Options +FollowSymLinks RewriteEngine On RewriteBase / RewriteCond %{HTTP_HOST} sentinel-technology\.co.uk [NC] RewriteCond %{SERVER_PORT} ^80$ RewriteRule ^(.*) http://www.sentinel-technology.co.uk/$1 [L,R=301] RewriteCond %{HTTP_HOST} sentinel-technology\.co.uk [NC] RewriteCond %{SERVER_PORT} ^443$ RewriteRule ^(.*) https://www.sentinel-technology.co.uk/$1 [L,R=301] And it just goes round it circles. Firefox reports that: The page isn't redirecting properly Firefox has detected that the server is redirecting the request for this address in a way that will never complete. * This problem can sometimes be caused by disabling or refusing to accept cookies.
♥peterpil19 Posted April 5, 2006 Author Posted April 5, 2006 Thats also what he stated in his description of what it would do...if you wish it to work the other way around just reverse the logic..... I had actually tried reversing it, but it didn't work. Doesn't matter, it all works now, and I'm happy. --Peter CE PHOENIX SUPPORTER Support the Project, go PRO and get access to certified add ons Full-time I am a C-suite executive of a large retail company in Australia. In my spare time, I enjoying learning about web-design. Download the latest version of CE Phoenix from gitHub here
Recommended Posts
Archived
This topic is now archived and is closed to further replies.