HOME > Webdesign > Html: Redirect - How To Redirect To Other Pages

HTML: Redirect - how to redirect to other pages

A "redirect" is an updated directional instruction for your browser, so to speak. Let's say you have a website and you move with it. If someone doesn't know about your change, he will open the old page. Wouldn't it be nice if he is automatically redirected to the new page?

How to realize a redirect in HTML

Generally, it is not mandatory to include a redirect. It's just a nice variation so that users don't have to face the 404 error code instead of seeing your website.
  1. You can add another tag within your <head> in the HTML document, through which users will be redirected after the connection request.
  2. Use the following form for this: <meta http-equiv="refresh" content="0; URL=" 'New link' " />.
  3. In the URL section, specify the address to the new web page. Replace the "0" with the delay of processing in milliseconds.
  4. But since you certainly want the redirection to happen automatically, leave the value at zero.
  5. To ensure that visitors are not surprised by the redirection, it is recommended to point it out with a text. Use for this the code <body>You will be automatically redirected to the new website. </body>.

HTML Redirect: What to look out for

Many browsers don't seem to get along with the meta tag within the <head> and trigger strange appearances. Therefore, use the redirect within your javascript.The whole thing will look like this: window.location = "New link";.In this step, you only change which page is displayed within the window and do not redirect directly to a new page. This solution is stable across browsers.

By Berke

Web.co.uk customer service: how to get in touch :: Schedule zoom meeting - how to use
USEFUL LINKS