UC Santa CruzInstructional Computing
ITS Home About ITS IC Services News Tutorials Technologies About IC Help

Redirecting users to a different HTML page

When you wish to redirect someone to your new page, you should make a small HTML page that informs users of the new address. It is also possible to have their browser automatically take them to the new site after a specified period of time has elapsed.

By putting

<META HTTP-EQUIV="Refresh" CONTENT="x; URL=new.URL"> 
in the HEAD of your HTML document, the user will automatically be taken to the new URL after a few seconds.

Note: Some browsers might not support HTTP-EQUIV. Therefore, you should always provide a link to the new site in your redirect page.

Example:

<html>
<head>
<title>This webpage has moved!
</title>
<META HTTP-EQUIV="Refresh" CONTENT="4; URL=http://www.newsite.com/"> 
</head>
<body>
<p>This webpage has moved <a href=http://www.newsite.com/>here</a>
<p>You should be automatically redirected in 5 seconds
</body>
</html>


Please use the form below to tell us what you think of this page.


UCSC Faculty Instructional Technology Center
2006-2008
Last updated 4/25/2008