Skip to content
Free · No install required

Redirect Path Builder — nginx, Apache, Vercel, Netlify

Compose URL redirect rules and export as nginx, Apache, Vercel, or Netlify config in one click.

Rules (1)

Export as

location = /old-path { return 301 /new-path; }

Why a redirect builder

When you migrate URLs (slug rename, domain change, content reorganization), you write redirect rules. The syntax is different for every host — and forgetting one detail breaks SEO and user bookmarks.

This tool lets you author redirect rules once and emit the right syntax for whichever stack you ship on. It’s also the fastest way to compare formats when you’re considering a host migration.

A pragmatic redirect checklist

When migrating URLs, hit all of these:

  • 301 the old URLs to their new destinations (preserve SEO authority).
  • Update internal links — don’t rely on redirects forever; redirects compound and slow down.
  • Update sitemap.xml to list only the new URLs.
  • Resubmit the new sitemap in Google Search Console.
  • Audit your redirects after a week — fix any 404s for old URLs you forgot.
  • Avoid redirect chains — A → B → C is two extra hops. Redirect A directly to C.

Use cases

  • Slug rename: redirect /blog/old-post-title to /blog/new-post-title.
  • Domain migration: bulk-redirect old domain paths to new domain paths.
  • Information architecture rework: collapse /products/foo and /store/foo into one canonical URL.
  • Affiliate/short links: redirect /r/xyz to a long affiliate URL with a 302 (temporary so the destination URL can change).

How to use

  1. 1

    Add your rules

    Each row: source path (what to redirect from), destination (where to send users), and status code (default 301).

  2. 2

    Pick the export format

    Choose nginx, Apache, Vercel, or Netlify. The output panel updates instantly with the correct syntax.

  3. 3

    Copy the config

    One click copies the full output ready to paste into your server config or repo.

DevZap Premium

Use this directly on any page with DevZap

DevZap brings every tool into your browser as a one-click extension. No tab switching, no copy-pasting URLs. Inspect, generate, and export from any page you visit.

FAQ

Frequently asked questions

Which status code should I use?
301 (permanent) for moved-forever URLs that should be reflected in search engines and bookmarks. 302 (temporary, legacy) when the original URL will return — rarely the right choice in 2026. 307 (temporary, preserves method) for short-term redirects that must keep POST as POST. 308 (permanent, preserves method) for the rare case you need a permanent redirect that also preserves request method. When in doubt, use 301.
What's the difference between 301 and 308?
Both are permanent. 301 historically allowed browsers to change the request method (POST → GET on redirect), which most do. 308 explicitly prohibits method change. For typical static page redirects (GET → GET), use 301; for API endpoints where you must preserve POST, use 308.
Can I use wildcards or regex?
This tool emits exact-match redirects. For wildcard or regex redirects, edit the output: nginx supports `~` regex blocks, Apache supports RewriteRule, Vercel supports `:slug` parameters in source paths, and Netlify supports `:splat`. Add those by hand once you have the boilerplate.
Where do I put the output?
nginx → server block in /etc/nginx/nginx.conf or sites-available. Apache → .htaccess at the docroot. Vercel → vercel.json at repo root (replace existing redirects array). Netlify → public/_redirects in your build output.

Ready to make your browser smarter?

Install DevZap free. Upgrade when you're ready.