Meta Redirect

General | Updated March 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

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 March 2026 · Browse all General articles

  • 347 Users Found This Useful

Was this answer helpful?

Related Articles

How can I change the index listing in a directory?

Article Updated This article has been consolidated Directory index configuration is...

What is a Virtual Domain (Addon Domain)

General | Updated March 2026 A virtual domain (also called an addon domain) lets you host a...

My site was hacked

General | Updated 2026 If your website has been hacked, defaced, or is redirecting to spam...

Why Do I Get Emails for Cron Jobs

Hosting Control Panel | Updated March 2026 Every time a cron job runs on your Ultra Web...

Subdomain Times Out or Not Loading

Errors & Troubleshooting | Updated March 2026 If your subdomain is timing out or not...



Save 30% on web hosting - Use coupon code Hosting30