Jun
20th

Create URL Redirection With HTML Redirect

Files under HTML & CSS | 4 Comments | 2,534 views

Do you know how to use HTML redirect to send your visitors to another page automatically? If you need to redirect your visitors to a new page, then this HTML redirect code may help you to do so.

When doing web site, there’s possibility that you may change the url of a web page. If your web page is popular, then your visitors may have already linked to it. However, if your webpage still new then it is recommended to replace your page with a new page that will redirect your visitors to the new page. This is to prevent you from losing your traffic.

Place this code inside the head section of your HTML code:

<meta http-equiv =”refresh” content=”0; url=http://www.yourdomain.com/”>

The parameters:

The “http-equiv” parameter set to “refresh”. This parameter tells the browser the content must be refreshed.

The “content” parameter defines when to refresh the content. The content=”0; is a delay before the redirection is performed. This time interval is in seconds.

Besides that, you can define your alternative url here. If the content has no url then your page will be simply refreshed. However, if you define an url, then the url will be displayed after the delay has over.

Example:

<html>
<head>

<meta http-equiv=”refreshcontent=”3;url=http://www.imDavidLee.com“>

</head>
<body>
This page will be redirected in 3 seconds!
</body>
</html>

The redirecting page will be displayed during 3 seconds. After 3 seconds delay, it will be replaced by “http://www.imDavidLee.com“.

(more…)