URL redirection, also called URL forwarding, domain redirection
and domain forwarding, is a technique on the World Wide Web
for making a web page available under many URLs.
Purposes
There are several reasons for a webmaster to use redirection:
Similar domain names
A web browser user might mis-type a URL -- for example, "gooogle.com" and "googel.com".
Organizations often register these "mis-spelled" domains and
re-direct them to the "correct" location: google.com. For example:
the web dsmarioparty.es and dsmarioparty.net could both redirect
to a single domain, or web page, such as dsmarioparty.com.
This technique is often used to "reserve" other TLDs with the
same name, or make it easier for a true ".edu" or ".net" to
redirect to a more recognizable ".com" domain.
Moving a site to a new domain
Why redirect a web page?
* A web site might need to change its domain name.
* An author might move his or her pages to a new domain.
* Two web sites might merge.
With URL redirects, incoming links to the an outdated URL can
be sent to the correct location. These links might be from
other sites that have not realized that there is a change or
from bookmarks/favorites that users have saved in their browsers.
The same applies to search engines. They often have the older/outdated
domain names and links in their database and will send search
users to the these old URLs. By using a "moved permanently" redirect
to the new URL, visitors will still end at the correct page.
Also, in the next search engine pass, the search engine should
detect and use the newer URL.
Logging outgoing links
The access logs of most web servers keep detailed information
from where visitors came and how they browsed the hosted site.
They do not, however, log which links visitors left by. This
is because the visitor's browser has no need to communicate
with the original server when the visitor clicks on an out-going
link.
This information can be captured in several ways. One way involves
URL redirection. Instead of sending the visitor straight to
the other site, links on the site can direct to a URL on the
original website's domain that automatically redirects to the
real target. This added request will leave a trace in the server
logs saying exactly which link was followed. This technique
is also used by some corporate websites to have a "warning" page
that the content is off-site and not necessarily affiliated
with the corporation. This technique does bear the downside
in the delay of an additional request to the original website's
server. For websites that wish to display a "warning" page
before automatically forwarding, the length of time the warning
is displayed is an additional delay.
Short, meaningful, persistent aliases for long or changing
URLs
Currently, web engineers tend to pass descriptive attributes
in the URL to represent data hierarchies, command structures,
transaction paths and session information. This results in
a URL that is aesthetically unpleasant and difficult to remember.
Sometimes the URL of a page changes even though the content
stays the same.