General

Meta Redirect

Updated November 2026 8,440 views 3 min read
General | Updated November 2026

A meta redirect uses an HTML meta tag to automatically send visitors from one page to another after a specified delay. While .htaccess redirects are preferred for SEO and performance, meta redirects are useful when you don't have access to server configuration or need a client-side redirect with a delay message.

HTML Code

Add this to the <head> section

<meta http-equiv="refresh" content="0;url=https://yourdomain.com/new-page">

The content="0" means redirect immediately (0 seconds). Change the number to add a delay (e.g., content="5" for 5 seconds). Change the URL to your destination.

01. The Meta Redirect Tag

The meta refresh tag goes inside the <head> section of an HTML page. When a browser loads the page, it reads the meta tag and automatically navigates to the specified URL after the delay.

Immediate redirect (0 seconds):

<meta http-equiv="refresh" content="0;url=https://yourdomain.com/new-page">

Delayed redirect (5 seconds):

<meta http-equiv="refresh" content="5;url=https://yourdomain.com/new-page">

The delay is useful when you want to show a message like "This page has moved. You will be redirected in 5 seconds..." before sending the visitor to the new location.

02. Full HTML Example

Here's a complete page with a meta redirect and a fallback link for users who aren't redirected automatically:

<!DOCTYPE html>
<html>
<head>
  <title>Page Moved</title>
  <meta http-equiv="refresh" content="3;url=https://yourdomain.com/new-page">
</head>
<body>
  <p>This page has moved. You will be redirected in 3 seconds.</p>
  <p>If not redirected, <a href="https://yourdomain.com/new-page">click here</a>.</p>
</body>
</html>

Save this as the old page's filename (e.g., old-page.html) and upload it to the same location as the original file.

03. JavaScript Redirect Alternative

JavaScript redirects are another client-side option. They work similarly to meta redirects but give you more control (like conditional logic):

<script>
window.location.href = "https://yourdomain.com/new-page";
</script>

Or with a delay:

<script>
setTimeout(function() {
  window.location.href = "https://yourdomain.com/new-page";
}, 3000); // 3000ms = 3 seconds
</script>

JavaScript redirects have the same SEO limitations as meta redirects. Use them only when server-side redirects aren't available.

04. Meta vs .htaccess Redirects

Recommendation

On Ultra Web Hosting, always use .htaccess redirects instead of meta redirects when possible. They're faster (the redirect happens before any HTML loads), better for SEO (Google treats 301s as permanent moves), and don't require the old page to exist.

The .htaccess equivalent of a meta redirect:

# 301 permanent redirect
Redirect 301 /old-page.html https://yourdomain.com/new-page

# Or with mod_rewrite
RewriteRule ^old-page\.html$ https://yourdomain.com/new-page [R=301,L]

Use meta redirects only when you cannot access .htaccess (like on a free hosting platform or a static page served by a third party). For a complete redirect reference, see our .htaccess guide and 302 Redirect Guide.

Need Help With Redirects?

If you need to set up redirects for a site migration or domain change, open a ticket and we can help configure the .htaccess rules.

Open a Support Ticket

Frequently Asked Questions

How do I create a meta redirect?

Add <meta http-equiv="refresh" content="0;url=https://yourdomain.com/new-page"> inside the <head> section of the old page. The browser reads the tag and navigates to the new URL automatically.

How do I add a delay before the redirect fires?

Change the number before the semicolon. content="0" redirects immediately, while content="5" waits 5 seconds, which lets you show a "this page has moved" message before sending the visitor on.

Should I use a meta redirect or an .htaccess redirect?

Use an .htaccess 301 whenever you can. It is faster, happens before any HTML loads, is treated by search engines as a permanent move, and does not require the old page to still exist. Reserve meta redirects for when you cannot edit server config.

Are meta and JavaScript redirects bad for SEO?

They are a weaker signal than a server-side 301 because they run client-side after the page loads. Search engines handle them, but a 301 passes ranking value more reliably, so use server-side redirects for anything SEO-sensitive.

Quick Recap: Meta Redirects

  1. Meta redirect: <meta http-equiv="refresh" content="0;url=...">
  2. Place it in the <head> section of the HTML page
  3. Change content="0" to add a delay in seconds
  4. .htaccess 301 is better for SEO and performance
  5. Use meta/JS redirects only when server-side redirects are not available

Last updated November 2026 · Browse all General articles

Share: X in Reddit f Email
  • 347 Users Found This Useful

Was this answer helpful?

Related Articles

Creating a Form Button

General | Updated December 2026 HTML form buttons let visitors submit data, navigate to...

Reseller: Unable to find an IP address in when creating an account

General | Updated November 2026 The "Unable to find an IP address" error in WHM appears when...

Firewall Block: How to Unblock Your IP

Errors & Troubleshooting | Updated November 2026 If you suddenly can't access your...

How can I turn off directory indexing?

General | Updated November 2026 If visitors can browse a list of files in your directories by...

Firewall and Security Protection

General | Updated November 2026 Every server in our hosting fleet is protected by multiple...



Save 30% on web hosting - Use coupon code Hosting30