| Web Site Design by Rainbo Design |
Using Tracking Codes in LinksGoogle treats query strings (ie. the stuff after the question mark) as a part of the URL in the links it follows. So, it sees two URLs pulling up the same content and will consider one or the other as a duplicate. This can lead to real trouble when you change affiliate tracking systems or any other navigation aid that relied on adding a Query String to an important URL on your site. The solution is simple. See the article below.
When Your Car Is Broken,
|
SEO Tips Menu |
The solution is to set up server code
301 redirects from the version of the URL that includes a query string to the same URL
without it. The method you use to do this depends on the server software that your host
uses. On an Apache-based host, you could use the following code in an .htaccess file:
RewriteEngine On
RewriteCond %{QUERY_STRING} ^(.+)$
RewriteRule ^(.*)$ http://www.yoursite.com/$1? [R=301]
Of course, this might not be the best solution in every case. Using a tracking code certainly implies the use of a counting mechanism and simple redirects to the same URL with the query string removed will not always get the job done. If all you need is the entry in your server log file in order to manage the task, then you don't need to do anything more. However, if your tracking system relies on software to handle the counting, then you need an intermediary step.
There are a couple of ways to handle this situation, but I think the simplest is to simply let mod-rewrite re-route the request to a counting script with the information embedded in the request URL for that script. Then, once the script has run to completion, it can seamlessly emit the 301 redirect to the destination page. I'm thinking the .htaccess code would be something like:
RewriteEngine On
RewriteCond %{QUERY_STRING} ^(.+)$
RewriteRule ^(.*)$ http://www.yoursite.com/cgi-bin/counter.cgi?q=%{QUERY_STRING}&p=$1?
Once you've installed the redirect, be sure to test it with my
HTTP Server Response Header Checker. Enter a URL for
your site that includes the tracking code and make sure it returns the proper
response code, including the new "Location:" URL.
If you want your site to rank higher in the search engines, my Search Engine Optimization Services
can give your website what it needs to get your fair share of search engine traffic quickly, without
disturbing your design, and without breaking your budget.
Search Engine Optimization Tips Main Page
Call Richard L. Trethewey in Minneapolis today at 612-408-4057 from 9:00 AM to 5:00 PM Central time to get started on your new website design package or search engine optimization program today!
Search Engine Marketing and Optimization Services by Richard L. Trethewey
Website Design by Rainbo Design Sitemap
Preferred Resources Page
Affordable Custom ECommerce Website Design by Rainbo Design Main Page
Thursday, 07-Aug-2008 16:18:36 MST