Redirect visitors using the HTML META tag and loading the other page automatically.
redirecting to another page, automatic redirection, loading another page automatically
Automatically redirecting visitors to another page Go to Automatically redirecting visitors to another page HTML & JavaScriptGo to HTML and JavaScript tips and tricksTips and tricksGo to web development Tips and tricksHomepage

Automatically redirecting visitors to another page

It might so happen that during the web site maintenance process, you might rename a page or move it to another location. One of your kind visitors (rare!) informs you that he/she stumbled on this page and it shows a "404 page not existing error".
Think about other users who have 'bookmarked' this page or worse still, search engines that have indexed this page.

A remedy to this problem would be to use an automatic redirection and we employ the <META> tag to accomplish this job.

Using the ETTP-EQUIV and CONTENT attributes with appropriate values, we can set up this redirection.

<META HTTP-EQUIV="REFRESH" CONTENT="10; URL=somepage.html">

The <META> tag has to be included in the HTML head. The CONTENT attribute takes two values. The first specifies the number of seconds for the page to refresh and the second is the page URL address. (Note: These two values are enclosed in only ONE pair of quotes and separated by a colon).

The code above redirects the user to somepage.html in 10 seconds.

It is also wise to include a link to the new page in the HTML body section for older browsers that do not recognize the <META> tag, something like:

The page has been moved <A HREF="newlocation.html">here</A>

AddThis Social Bookmark Button


Page contents: Automatically redirecting visitors to another web page using the HTML META tags and loading this page in place of the old one.

Page URL: http://www.webdevelopersnotes.com/tips/html/ automatically_redirecting_visitors_to_another_page_.php3



Join Mailing List


Feedback/Questions




50+ web hosting FAQs

Search engine for your website

Free software from Google - The Google Pack Collection

Create your own search engine
Search WebDevelopersNotes.com