Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Pagerank: does the url need a WWW?


peterpil19

Recommended Posts

Posted

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

Posted
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

Posted
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

Posted

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

Posted

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.

Posted

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

Posted
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
Posted
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.....

Posted

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.

Posted
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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...