HTML Meta Tag for Redirect (Meta Refresh)


How to create an automatic page redirect using the HTML meta refresh tag. Includes syntax, redirect delay options, examples with 301 SEO redirects.

Meta refresh redirect is an HTML meta tag that automatically sends users to another web page after a delay. This method is commonly used for:

  • Moving pages to new URLs
  • Simple temporary redirects
  • Redirects that work without server access

Basic HTML Meta Redirect Example

The simplest redirect sends users to another page instantly.

HTML
<meta http-equiv="refresh" content="0; URL=https://example.com/">

What this does:

  • content="0" - delay in seconds
  • URL= points to the new page

Redirect After a Delay

The code shown below is an example of redirecting the current page to another page after 5 seconds:

HTML
<meta http-equiv="refresh" content="5; URL=https://example.com/">

Place the meta tag inside the <head>, ideally right after the <title> and before other script/style tags.

Full HTML Page Example

HTML
<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="refresh" content="3; url=https://example.com/">
    <title>Redirecting...</title>
</head>
<body>
    <h2>Redirecting...</h2>
    <p>
    	If you are not redirected automatically,
    	<a href="https://example.com/">click here</a>.
    </p>
</body>
</html>

Page Redirect Code Generator Tool

Live Meta Redirect Generator Tool:

  • Enter target URL
  • Choose delay in seconds
  • Generate <meta> code instantly
  • Copy the code
second

Full code HTML Meta Redirect

HTML
<html>
<head>
	<title>Page Title</title>
	<meta http-equiv="Refresh" content="5; url=https://www.html-code-generator.com/">
	<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
	<h1>HTML code Generator</h1>
	<h2>This site has now moved to <a href="https://www.html-code-generator.com/">https://www.html-code-generator.com/</a>.</h2>
	<p>Your browser will automatically redirect you within 5 seconds. Please alter any <b>bookmarks</b></p>
	<p>Many thanks</p>
</body>
</html>

301 Permanent Redirect Using Meta Tag

Meta tag redirects are not ideal for SEO, but if you cannot edit .htaccess or server config, you can force search engines to treat it like a permanent redirect:

HTML
<meta http-equiv="refresh" content="0; url=https://example.com/">
<meta name="robots" content="noindex,follow">
  • Search engines may understand this as permanent
  • Better than nothing if server redirects are not possible

When Meta Refresh Should Not Be Used

Avoid it for:

  • E-commerce checkout redirects
  • High SEO ranking pages
  • Pages that need instant 301 redirects