Canonical Link Questions

slacker77

New member
Oct 8, 2009
384
1
0
I have been trying to nail down the on page optimization of a website of mine and have been questioning the internal link structure and how it effects rankings, seo, etc. The site in question is an ecomm site and has 99% of its inbound SEO links pointing to the www version of the website and not the non www version. Within the site I can see that a lot of the product links are pointing to what I think is the non www version. It hasn't caused any issues that I am aware of and the site is ranked very highly for its primary keyword.


Should I be changing these internal product links to point to the www version instead and if so has anyone noticed improvements with rankings by doing this? Has there been any proof that this type of linking structure actually helps?

Also The product pages are dynamic however I have a rewrite in the .htaccess file that changes these dynamic product pages into Static pages using the part name. For example the dynamic page looks like

http://www.xyz.com/products.php?id=1234

the rewrite looks like this

http://www.xyz.com/widget1.htm

I do not think I am using a cononical rewrite in the .htaccess for pointing non www to www as I am not sure if this will cause any issues with the other dynamic to static rewrite I have. Forgive me as I am not a professional web developer but I have managed to figure a lot of this stuff out with research. Any advice would be great.

Thanks.
 


Just start your .htaccess like this:

Code:
RewriteEngine On

RewriteCond %{HTTP_HOST} ^domain\.com$ [NC]
RewriteRule ^(.*)$ http://www.domain.com%{REQUEST_URI} [R=301,L]
 
This is what I have

# Rewrite static URLs to dynamic
RewriteRule (.*)\.htm$ /proddetail.php?prod=$1
#
# Redirect only client-requested dynamic URLs to static
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /proddetail\.php\?prod=([^&]+)\ HTTP/
RewriteRule ^proddetail\.php$ http://www.xyz.com/%1.htm? [R=301,L]

Can I still add the code you specified lschmidt?

Thanks.
 
This is what I have

# Rewrite static URLs to dynamic
RewriteRule (.*)\.htm$ /proddetail.php?prod=$1
#
# Redirect only client-requested dynamic URLs to static
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /proddetail\.php\?prod=([^&]+)\ HTTP/
RewriteRule ^proddetail\.php$ http://www.xyz.com/%1.htm? [R=301,L]

Can I still add the code you specified lschmidt?

Thanks.

Yeah, it will not cause any problems. Just make sure the code I supplied is the *first* thing in your .htaccess, above what you already have.
 
Within the site I can see that a lot of the product links are pointing to what I think is the non www version... Should I be changing these internal product links to point to the www version instead and if so has anyone noticed improvements with rankings by doing this?

Yeah if your htaccess is forcing everything to use www then it's best to have internal links to point to www. Probably not causing problems if they point to non-www, but it's not ideal. The 301 redirect is a great tool, but I prefer fewer redirects whenever possible, especially on internal links. Just seems quicker, more efficient for G to figure out the juice flow that way, and less chance for them to fuck it up.
 
Yeah if your htaccess is forcing everything to use www then it's best to have internal links to point to www. Probably not causing problems if they point to non-www, but it's not ideal. The 301 redirect is a great tool, but I prefer fewer redirects whenever possible, especially on internal links. Just seems quicker, more efficient for G to figure out the juice flow that way, and less chance for them to fuck it up.

definitely. And make sure you are using <link rel="canonical" href="http://www.mysite.com/page.html" /> on all your pages.