How to Redirect One Web Page to Another

Sooner or later you need one address to send people to another: you renamed a page, replaced an old demo, or want a memorable link that forwards to a longer one. There are a few ways to redirect, and they are not equal — the right choice depends on whether search engines are involved.

The simplest: an HTML meta refresh

If all you can edit is the HTML file itself, one tag does it. Make the old page contain only this:

<!doctype html>
<meta charset="utf-8">
<meta http-equiv="refresh" content="0; url=https://your-site.hdply.com/new-page/">
<p>This page has moved. <a href="https://your-site.hdply.com/new-page/">Continue</a>.</p>

The content="0; url=..." means "redirect immediately." This works anywhere you can put an HTML file — including a static host like hdply, where you just replace the old page's HTML with the snippet above. Always include the visible link too, as a fallback for anyone whose browser blocks the auto-refresh.

The nicer-for-SEO option: a server redirect

A meta refresh works, but search engines treat it as a weak signal. If you're moving a page that has search ranking or inbound links you care about, a proper 301 redirect (sent by the server as an HTTP status) is better — it tells search engines "this moved permanently, transfer the credit." The catch is that a 301 has to be configured at the hosting layer, which not every static host exposes. When it matters, check whether your host supports redirect rules.

A JavaScript redirect (and why it's a last resort)

<script>location.replace("https://your-site.hdply.com/new-page/");</script>

This works in the browser but only after the page and its JavaScript load, it fails if scripts are blocked, and search engines handle it inconsistently. Reach for it only when you need logic — say, redirecting based on the URL's query string — that the static options can't express.

Which should you use?

  • Personal link, moved demo, no SEO stakes? Meta refresh — one file, done.
  • Moving a page that ranks or has backlinks? A 301 server redirect if your host offers it.
  • Need conditional logic? JavaScript, knowing its limits.

Related: Share an HTML file as a link · Essential meta tags for a single page

From a file on your desktop to a live URL in under a minute.

Deploy your first page