Skip to main content

Free 301 Redirect Generator

Enter an old path and a new URL. Copy host-ready snippets for a permanent (301) or temporary (302) redirect.


Technical SEO

Generate a 301 or 302 redirect

Snippets for Apache, Nginx, Vercel, Next.js, Netlify, and Cloudflare. Test the live chain after you deploy.

Copy the snippet for your host. Test the live chain with the redirect checker after you deploy.

Apache (.htaccess)

RewriteEngine On
RewriteRule ^old-page$ https://www.example.com/new-page [R=301,L]

Nginx

location = /old-page {
    return 301 https://www.example.com/new-page;
}

Vercel

{
  "redirects": [
    {
      "source": "/old-page",
      "destination": "https://www.example.com/new-page",
      "permanent": true
    }
  ]
}

Next.js

// redirects() in next.config.js / next.config.ts
{
  source: "/old-page",
  destination: "https://www.example.com/new-page",
  permanent: true,
}

Netlify

/old-page  https://www.example.com/new-page  301

Cloudflare _redirects

/old-page https://www.example.com/new-page 301

After deploy, verify the chain with the redirect checker.

How to use

How to use 301 Generator

  1. 1

    Enter from and to

    Old path (or URL) and the destination URL.

  2. 2

    Choose 301 or 302

    Permanent vs temporary.

  3. 3

    Copy and deploy

    Paste the snippet for your host, then test with the redirect checker.

Guide

How to generate a 301 redirect

Use 301 when a URL has moved for good so crawlers consolidate signals. Use 302 for a short-lived test or maintenance path.

Pick the snippet that matches how you host: next.config or vercel.json on this stack, Nginx/Apache on a VPS, _redirects on Netlify or Cloudflare Pages.

Always verify the live chain after deploy. A generator cannot see a CDN rule that overrides your file.

Explore more on free ScrollLaunch tools, browse DR-ranked directories, or launch with a dofollow backlink.

Questions

301 Generator FAQ

When should I use 301 vs 302?

301 is permanent (URL moved for good - search engines usually transfer signals). 302 is temporary (A/B test, short maintenance).

Which snippet should I use?

Match your host: Vercel/Next.js for this stack, Nginx or Apache on a VPS, _redirects on Netlify or Cloudflare Pages.

How do I verify the redirect?

Deploy, then paste the old URL into the redirect checker.