lobsite! Sign in Sign up

Free · runs in your browser · no sign-up

Redirect Generator

Turn a list of old and new URLs into redirect rules for lobsite.toml, Netlify, Vercel, Nginx and Apache .htaccess, with loops and chains caught.

Generate your redirect rules

One per line: old path, new path or URL, and optionally the status. :name matches one segment, a final * the rest (:splat in the target). A Netlify or Cloudflare _redirects file pastes in as it is.

Lobsite 5 rules
  • No loops, chains or duplicates.

301 → /posts/hello-world, from line 3

Next List the new addresses for search engines: XML Sitemap Generator → Publish your site ↓

How to use the redirect generator

  1. Paste your redirects

    One per line: the old path, the new path or URL, and optionally the status (301 when you leave it out).

  2. Pick your host

    Lobsite, Netlify or Cloudflare Pages (all three read a _redirects file), Vercel (vercel.json), Nginx, or Apache (.htaccess).

  3. Check and copy

    Fix anything the checks find, try a few paths in the box below, then copy or download the rules.

Moving from Netlify or Cloudflare Pages? Paste your _redirects file as it is.

Redirect patterns

  • :name matches one path segment and can be used in the target: /blog/:slug /posts/:slug.
  • A final * matches the rest of the path, which is :splat in the target: /docs/* /guide/:splat.
  • The query string is passed on to the new address.
  • Rules are checked from the top and the first match wins, so put specific rules before general ones.

On Lobsite, put the _redirects file at the top of the folder you deploy, however you deploy it: the CLI, a drop in the dashboard or an AI agent. The same rules also work in lobsite.toml, or in the site's Settings tab. For Nginx and Apache, patterns become regular expressions with numbered groups.

301 or 302: which redirect status to use

  • 301 (permanent): the page has moved for good. Search engines move its ranking to the new address. Use this for most site moves.
  • 302 (temporary): the original address will come back, such as during a sale or maintenance.
  • 308 and 307: the permanent and temporary versions that keep the request method, for forms and APIs that POST to the old address.

Redirect loops and chains

A loop (/a → /b → /a) means the page never loads. A chain (/a → /b → /c) works, but each hop adds a round trip and search engines may stop following after a few. The generator catches both, along with duplicate rules, where only the first one is used.

Redirects FAQ

How many redirects can I have?

A Lobsite deploy takes up to 1,000 rules, from _redirects and lobsite.toml together, and the site's Settings tab another 100. For whole sections, use a pattern like /old-blog/* /blog/:splat instead of one rule per page.

Can the old address be a full URL?

Paste it and the generator keeps just the path: redirects apply to the site they're deployed with. To move a whole domain, point it at the new site and redirect there.

Do redirects work without server access?

On Lobsite, Netlify, Vercel and Cloudflare Pages they're part of the deploy, so no server access is needed. On a plain file host, the fallback is a page with <meta http-equiv="refresh" content="0; url=/new">, which search engines treat like a redirect.

Is anything sent to a server?

No. The rules are checked and written in your browser.

Publish your site with its redirects

On Lobsite, a _redirects file at the top of the folder is all it takes.

All SEO and site file tools →