Sunday, November 25, 2012

Dynamic Canonical Links in PHP and RackSpace Cloud Issue with Google indexing ""

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 "" reference rather than your domain name.

RackSpace suggest setting the canonical URL link, as do Google:

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