Resources Web Studio

How to set up HTML redirects

Drop a tiny HTML file at the old path. Pathline serves it. The visitor lands on the new URL.

Christian Dunbar

2 min read

Paste into Cursor, ChatGPT, or Claude to get a model-ready redirect workflow.

You do not need server config files for a basic redirect on Pathline. Put this HTML in any file on your site, then upload it in Web Studio.

Use it for a permanent move (think 301) or a temporary one (think 302). Same file either way: the old URL serves this page, and the browser goes to the new one.

The whole file

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="refresh" content="0; url=https://www.example.com">
  <title>Redirecting…</title>
  <link rel="canonical" href="https://www.example.com">
  <script>location.replace("https://www.example.com");</script>
</head>
<body>
  <p>Redirecting to <a href="https://www.example.com">example.com</a>…</p>
</body>
</html>

Swap https://www.example.com for your destination everywhere it appears (meta refresh, canonical, script, and the fallback link).

Where can I put it?

  • Root file. Save as old-page.html if people hit /old-page.html.
  • Folder URL. Save as services/index.html if people hit /services/ and that folder should send them elsewhere.
  • Same site. Relative paths work too: /contact/ or https://yoursite.com/contact/.

Any HTML path Pathline already serves can be a redirect. Replace the old page content with this file, or add a new file at the path you want to catch.

What each piece does

  • meta http-equiv="refresh" sends browsers that honor meta redirects.
  • location.replace(…) is the fast path for modern browsers, and it avoids cluttering history.
  • rel="canonical" points search engines at the destination URL.
  • The body link is a fallback if scripts or meta refresh are blocked.

Checklist

  1. Paste the template into the HTML file at the old path.
  2. Update every copy of the destination URL.
  3. Upload to Pathline Web Studio.
  4. Open the old URL and confirm you land on the new one.

That is it. One file. Works on Pathline Hosting.

Learn more about Pathline Hosting

Build with Pathline

One workspace for the conversations that grow your business.

Contact sales