Techie Tip of the Week: Redirect Web Pages to New Locations (meta refresh method)

Has your group redesigned your website and moved to a new location? Renamed your organization’s name? Want to automatically redirect visitors to your web site to the new location? This week and next week’s tips will show you how.

There are basically two options to redirect visitors to your web site to a new location: the meta refresh method and the permanent redirect method. This week, we’ll show the META REFRESH method.

Redirecting using META REFRESH

NOTE: This method works best if you are only redirecting a single page to a new location.

  1. Open the source code of the web page you wish to redirect in a text editor.
  2. In the HEAD section, enter the following code (substitute num with the desired number of seconds the browser will wait before redirecting; substitute newlocation with the new URL.

    <meta http-equiv="refresh" content="num; url=newlocation" />

    So, for example, to redirect to after 3 seconds:

    <meta http-equiv="refresh" content="3; url=" />

You can also use the META REFRESH method without the URL to have a web page automatically reload after a certain number of seconds. Newspaper and other news-oriented web sites often do this.

For example, to automatically reload the browser every 30 minutes (1800 seconds):

<meta http-equiv="refresh" content="1800" />

Next week, we will talk about Option 2: permanent redirects!

Tags: , ,

Leave a Reply

You must be logged in to post a comment.