Skip to content
ZeroServer.tools

Meta Redirect Generator

Generate HTML meta refresh redirects with configurable delay. Also shows JS and PHP redirect code.

Target Host: NoneDelay: 0sActive Format: HTML

Meta refresh tag only: <meta http-equiv="refresh" content="0;URL='https://example.com'">

Meta Redirect Generator

Generate redirect code in three formats: HTML meta refresh, JavaScript, and PHP. The HTML meta refresh is the most universally supported option — set delay to 0 for an immediate redirect or any positive number for a timed redirect. The JavaScript redirect uses window.location.href and is more flexible, while the PHP header redirect is best for server-side redirects. All code is generated client-side.

Built and maintained by Meet Shah · Last updated

What this tool is used for

  • Adding a redirect on a static host where you cannot set an HTTP status.
  • Producing a holding page that moves visitors on after a short delay.
  • Getting the syntax right for a technique you use rarely.
  • Comparing the meta, JavaScript and server-side options for one case.
  • Producing a redirect for a single file you cannot serve headers for.

Frequently Asked Questions

Is a meta refresh a real redirect?
Not in the HTTP sense — the server returns 200 and the browser then navigates itself. That difference matters: a 301 tells caches and crawlers the resource moved permanently, while a meta refresh is a page that happens to leave. Use a server redirect wherever you can set one.
Does the delay value change how search engines treat it?
Yes. Google has said it treats a **zero-second** meta refresh much like a 301, and a delayed one as a soft redirect that may not pass ranking signals at all. If SEO matters and you cannot set a header, use content="0;URL=…" rather than a countdown.
Why does the generated page include a manual link?
Because meta refresh can be disabled, and some assistive technology and older browsers do not follow it. Without a visible link, those users land on a blank page with no way forward — WCAG 2.2 also treats an automatic timed redirect as something users must be able to escape.
When should I use the JavaScript version instead?
When the destination depends on something only the client knows — a stored preference, a hash fragment, a feature test. window.location.replace() is usually better than assigning href because it does not leave the interstitial in the history, so Back does not bounce the user straight forward again.
What does the PHP version do differently?
It sets a genuine HTTP header before any output, which is the real redirect the other two are approximating — a 301 or 302 with a Location. It is the right answer whenever you control the server, and it must run before a single byte of body has been sent or the header call fails.

Common errors and gotchas

  • Using it where SEO matters, since a server-side 301 transfers ranking signals and this does not.
  • Setting a non-zero delay, which traps the visitor and breaks the browser back button.
  • Assuming crawlers follow it reliably, when treatment varies.
  • Relying on it for a URL that must return a redirect status to an API client.
  • Leaving the fallback link out, which strands anyone whose browser blocks the refresh.

Related Web & SEO tools

Private & free — this tool runs entirely in your browser.

Namecheap — Register a domain for your next project — from $1.98/yr.affiliate