Skip to main content
html redirect

How to Redirect to Another URL

To inform search engines and website visitors that your webpage has permanently moved to a new location with equivalent content, use a 301 redirect. The "301" code means "moved permanently."

How to Redirect to Another URL

The simplest way to redirect to another URL is to use an HTML <meta> tag with the http-equiv parameter set to "refresh." The content attribute sets the delay before the browser redirects the user to the new webpage. To redirect immediately, set this parameter to "0" seconds for the content attribute.

<meta http-equiv="Refresh" content="0; url='https://www.w3docs.com'" />

If you want your redirect to happen at a specific time, simply specify your preferred parameter (in seconds) for the content. Consider an example, where we set "7" seconds as the redirect time.

Some browsers do not display the <meta> refresh tag correctly, so before the next page loads, the user may see a flash as a page.

<meta http-equiv="refresh" content="7; url='https://www.w3docs.com'" />

How to Redirect a Web Page in HTML

Some older browsers do not update correctly when you add a quick link. In that case, you can add an anchor link for the user to follow.

Example of redirecting a web page:

html_code

Add new comment

HTML Restringido

  • You can align images (data-align="center"), but also videos, blockquotes, and so on.
  • You can caption images (data-caption="Text"), but also videos, blockquotes, and so on.

Contact info

Global leader in consulting services, digital transformation, technology, and engineering.

  • Camino de las Ceudas 2 Bis
    28032 - Las Rozas de Madrid
  • (+34)647 555 222
  • info@aeioros.com