Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Site Config


hbcloud

Recommended Posts

Can anyone tell me why using "www" in front of the url would yield different results in google vs. not using it. I'm on a shared server and I would imagine its something that I configured wrong or maybe even when I set up the site. I just cant find a reason for it.

 

:blink:

Link to comment
Share on other sites

yes search engines treat pages with www/without as different domains. By setting up your htaccess to redirect everything to www yields the desirable results.

 

Because if you think about it consider a huge host like yahoo or msn, now its not gonna be the same exposure for say mypersonalhomesite.yahoo.com vs www.yahoo.com

Link to comment
Share on other sites

yes search engines treat pages with www/without as different domains. By setting up your htaccess to redirect everything to www yields the desirable results.

 

Because if you think about it consider a huge host like yahoo or msn, now its not gonna be the same exposure for say mypersonalhomesite.yahoo.com vs www.yahoo.com

 

Can you tell me how I need to set the redirect in the file?

Link to comment
Share on other sites

Here is an example but you need to verify (with your host) different hosts have slightly different settings.

 

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

Link to comment
Share on other sites

Here is an example but you need to verify (with your host) different hosts have slightly different settings.

 

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

I tried that, the htaccess file has nothign but the info you sent. Still nothing. Its weird, some of the links on my site go to www.mysite.com/whatever and others point to mysite.com/whatever

Link to comment
Share on other sites

was hoping it would had something. Because you need this to enable the rewrite engine before the previous code

 

# Start Engine
RewriteEngine On 
RewriteBase /

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...