A redirect quietly forwards visitors from one URL to another. Pick the right type and search engines follow along; pick the wrong one and rankings you spent years building can evaporate.

301 — permanent

A 301 says "this page has moved for good." Browsers cache it, and — crucially — search engines transfer the old URL's ranking signals to the new one. Use it for: domain changes, HTTPS migration, restructured URLs, deleting a page in favour of a better one.

302 — temporary

A 302 says "temporarily elsewhere — keep the old URL indexed." Search engines keep ranking the original. Use it for: maintenance pages, A/B tests, short-lived campaign pages, geo-redirects.

The classic mistake: using a 302 for a permanent move. The new page never inherits the old one's authority, and the old URL lingers in search results indefinitely.

Setting redirects up

Apache (.htaccess)

A single page: Redirect 301 /old-page.html /new-page.html. Site-wide HTTPS and www rules use mod_rewrite — our .htaccess Generator writes the whole file from checkboxes: force-HTTPS, www or non-www, SPA fallback, caching and compression included.

Nginx

Redirects live in the server block: return 301 https://example.com$request_uri;. The Nginx Config Generator produces a complete config with the HTTP→HTTPS redirect server block, SSL paths and static caching.

Generate your config

.htaccess or Nginx rules built from checkboxes — copy, paste, done.

Open .htaccess Generator

Redirect hygiene

  1. Redirect to the equivalent page, not the homepage. Mass-redirecting deleted pages to the root is treated as a soft-404.
  2. Avoid chains. A→B→C wastes crawl budget and slows users; point A directly at C.
  3. Update internal links too. Redirects catch external visitors; your own site should link straight to the new URL.
  4. Keep 301s in place for at least a year — search engines revisit slowly.

After restructuring, update your sitemap, re-validate it with the Sitemap Validator, and check crawl rules with the Robots.txt Tester so the moved pages get re-indexed quickly.

F
freetoolzhub team

We build fast, private, watermark-free tools for everyone. Follow along for tips and updates.