How do you Redirect Users to Another Web Page Automatically?

Sometimes you may want users to go to another page for some reasons like your web page is under construction or you own many domains so that nobody else can own them and you want to redirect users to your main domain or your web page has moved to another domain.

You can use metadata in your header to instruct web browsers how they should display or handle your web page. You use the meta element with the http-equiv attribute to automatically redirect users from one page to another. The value content specifies how many seconds before the refresh happens and what URL (Uniform Resource Locator) you want to jump to.

For example:

<html>

<head>
<title>Redirect User to Another Page</title>
<meta http-equiv=”refresh” content=”10; url= http://www.evecorner.com/”>
</head>

<body>

<p>This website is under development. Please visit <a href=http://www.evecorner.com>www.evecorner.com</a> for the meantime.</p>

<p>Please wait 10 seconds to be automatically redirected to Eve Corner website.</p>

</body>
</html>

Older web browsers may not know what to do with meta elements with http-equiv attribute. What you can do is include some text and link on your web page to enable user to link manually to your redirector page. So the user can just click the hyperlink in your web page to go to another page as shown above.

 

More by this Author


Comments 11 comments

Ultimate Hubber profile image

Ultimate Hubber 6 years ago

I have been applying a lot of redirects lately due to a glitch in my webhosting where readers were redirected to s subdomain from my main domain so as the pages from subdomains were then indexed by Google I was applying redirects from subdomain to the main domain.

Thanks for the hub!


rprcarz50 profile image

rprcarz50 6 years ago

Nice work , and great information that many Hubbers can use.

Thank you

Ron

As always Also a2z50


tony0724 profile image

tony0724 6 years ago from san diego calif

Lots of good Information here. I am as dumb as a box of rocks around a computer so all help is appreciated. Good Job

dyesebel


Neil Sperling profile image

Neil Sperling 6 years ago from Port Dover Ontario Canada

Thanks a Billion!


dyesebel10 profile image

dyesebel10 6 years ago from USA Author

thanks for all the comments.


dreamreachout 6 years ago

I am a computer novice and you have answered a necessary question with this hub. Thanks so much!!


Cheeky Girl profile image

Cheeky Girl 6 years ago from UK and Nerujenia

Some easy to follow Html tips here and good info for redirecting. I read about tags and special codes for putting on pages to let search engines know the location of a page has been changed so they know where to find it and so your rating is not affected. Its good to know, especially if you run or set up a web site. Cheers! : )


dyesebel10 profile image

dyesebel10 6 years ago from USA Author

thanks dreamreachout and Cheeky Girl.


Lita C. Malicdem profile image

Lita C. Malicdem 6 years ago from Philippines

It embarrasses me to know that I can't do this by myself. My daughter will appreciate this hub very much and from here, she'll help me follow your tips.Thank you.


dyesebel10 profile image

dyesebel10 6 years ago from USA Author

thanks Lita for stopping by.


zzron profile image

zzron 6 years ago from Houston, TX.

Cool info thx.

    Sign in or sign up and post using a HubPages Network account.

    0 of 8192 characters used
    Post Comment

    No HTML is allowed in comments, but URLs will be hyperlinked. Comments are not for promoting your articles or other sites.


    Click to Rate This Article
    working