Server Side Redirect

A server side redirect is a method of URL redirection using an HTTP status code (e.g., 301 Moved Permanently, 303 See Other and 307 Temporary Redirect) issued by a web server in response to a request for a particular URL. The result is to redirect user's web browser to another web page with a different URL.

One method of implementing server-side redirects is the .htaccess file supported by most Apache web servers. An example of the code used is as follows.

redirect 301 /index.html

Common uses of server-side redirects include:

  • redirecting people away from a discontinued server
  • load balancing
  • redirecting to error pages if a discontinued URL is used
  • link use tracking, as done at the AltaVista search engine
  • spamdexing
  • ensuring old links and bookmarks still work when a page is renamed
  • allowing users to use an abbreviated URL in place of a longer (perhaps less memorable) one


PHP code for server-side redirect.


ASP.NET code for server-side redirect.


Implementation in JavaServer Pages (JSP).

response.setHeader("Location", "");

  This article uses material from the Wikipedia page available here. It is released under the Creative Commons Attribution-Share-Alike License 3.0.



Connect with defaultLogic
What We've Done
Led Digital Marketing Efforts of Top 500 e-Retailers.
Worked with Top Brands at Leading Agencies.
Successfully Managed Over $50 million in Digital Ad Spend.
Developed Strategies and Processes that Enabled Brands to Grow During an Economic Downturn.
Taught Advanced Internet Marketing Strategies at the graduate level.

Manage research, learning and skills at Create an account using LinkedIn to manage and organize your omni-channel knowledge. is like a shopping cart for information -- helping you to save, discuss and share.

  Contact Us