How do you redirect users on a website?

Answer:
If using a server-side language, you may output a "Location" header that tells most modern browsers to immediately redirect there.

Alternatively, you may use the "meta" HTML tag:

<meta http-equiv="Refresh" content="5;url=http://www.example.com">

The integer (number 5) should be replaced with the number of seconds you want the user to have to wait to be redirected to another page. The URL should be replaced with URL you want the user to be redirected to.

First answer by Twiyp. Last edit by Twiyp. Contributor trust: 190 [recommend contributor recommended]. Question popularity: 3 [recommend question].