This situation may affect the functionality of any service which uses the URL
to identify a web page (resource). That's why URL Consistency is so
important.

The solution

It is a complex problem and possible solutions vary case by case. Here are
some available solutions:

Use a single Canonical HostName

Strip unwanted query strings from incoming URLs

Use a single Canonical HostName

Most websites response to hostname either contains www or not.
That is
right. However, it is recommended to redirect www to
non-www hostname or the opposite. Which one to select? There are
arguments for
each choice. See http://no-www.org
and http://www.yes-www.org.

Strip unwanted query strings from incoming URLs

A query string is the part of a URL that contains data to be passed to web
applications such as
CGI programs. For example:

http://www.example.com/?id=1&category=sales

The part of URL after the question mark ("?") is the Query String
(id=1&category=sales).

Some websites (among them some great services as Linkedin
and Feedburner)
include
query strings to incoming URLs of your
website for tracking purposes (like "?goback=" etc). In most cases
these query strings considered
"unwanted" and could be stripped.

Here is a solution for Apache web server. Similar solutions are available for
Microsoft IIS and NGINX web
servers.

I use an .htaccess file in the server root with the following
content:

Use simple Feedburner URLs

If you select Feedburner to track detailed statistics for your feed, the URLs
to your website contains query strings like utm_source and &utm_medium).
FeedBurner URL seems like
http://feedproxy.google.com/~r/YourFeedName/...

In order Feedburner URLs to be exactly as your site URLs, navigate to the
Analyze tab, click on Configure Stats and deselect checkbox for Item link
clicks as follows:

(click
the
thumb for full image)

Share your experience with other web servers (e.g. Microsoft IIS). Do you
prefer WWW or non-WWW? Leave us a
comment.

Sign-up for our free email
newsletter. Get updates when new
tutorials and tips are published. You can unsubscribe
anytime with a click.

Your comments are
welcomed!

This site actively encourages commenting on any post.
Comments are
not pre-moderated, but this community does not tolerate
direct or
indirect attacks, name-calling or insults. Please, read
terms of use
and Comment Policy at privacy
policy.