Sunday, November 25, 2012

Dynamic Canonical Links in PHP and RackSpace Cloud Issue with Google indexing "static.cloud-ips.com"


Using RackSpace cloud as a server is pretty sweet. One thing you need to look out for is Google indexing your server space from the "static.cloud-ips.com" reference rather than your domain name.

RackSpace suggest setting the canonical URL link, as do Google:
http://googlewebmastercentral.blogspot.sg/2009/02/specify-your-canonical.html



When you've already made a site with thousands of links this might be a bit of a problem. Never mind, here's a dynamic way of setting the canonical link in PHP:


No comments:

Post a Comment