
I recently encountered a scenario where a simple 301 redirect was setup in IIS which winded up breaking Google Analytics for AdWords tracking. What happened is that a 301 redirect was setup in order to combine www.website.com and website.com into one as www.website.com. This is a standard SEO tactic used to ensure that search engines only see one version of a website. This prevents duplicate content issues and focuses any PageRank received from inbound links to one site.
Here is the correct way to setup a 301 redirect in IIS:
Guess what – you just broke your website. Here’s how; If a backlink to your site uses a deep link, like website.com/folder/page.html and you set your redirect to www.website.com then anyone clicking that backlink will be sent directly to the root of your site (or worse) at www.website.com instead of the deep link page that you intended them to visit.
In order to properly execute a 301 redirect in IIS you must follow the ‘Redirect to:’ URL with $S$Q in order to pass the suffix of the URL to the redirected URL like this http://www.website.com$S$Q (note there is no / after the .com).
This change will allow http://website.com/folder/page.html to redirect to http://www.website.com/folder/page.html properly within IIS.
-Enjoy!
Check out this link if you need to setup 301 redirects in PHP / Apache.
Check out this link if you need more IIS 301 information.
One Response
acancida
03|Aug|2008 1Brilliant!
Leave a reply