Generate redirect code in four common formats (Apache .htaccess, Nginx, HTML meta-refresh, JavaScript) for an old URL to new URL mapping.
Google AdSense Banner
This area will contain advertisements after approval.
Google AdSense Banner
This area will contain advertisements after approval.
This tool produces ready-to-use redirect code for common server and page-level setups. It does not check or follow an actual live redirect on the internet, browsers can't read cross-origin response headers or redirect chains without a server-side proxy, so verifying a redirect is actually working requires checking it directly (e.g. via your browser's network tab, curl, or your hosting provider's tools) after you deploy the code.
Use a 301 (permanent) redirect when a page has moved for good, this passes SEO ranking signals to the new URL and tells search engines to update their index. Use a 302 (temporary) redirect when the move is short-term, like a temporary maintenance page, since it tells search engines to keep the original URL indexed.
Say you enter old path /old-page, new destination https://example.com/new-page, and choose 301 (Permanent). The Apache output is Redirect 301 /old-page https://example.com/new-page (for .htaccess). The Nginx output is location = /old-page { return 301 https://example.com/new-page; }. The HTML fallback is <meta http-equiv="refresh" content="0; url=https://example.com/new-page">. The JavaScript fallback is window.location.href = "https://example.com/new-page";, only use the server-level Apache or Nginx version in production, the HTML/JS versions are last-resort options for when you lack server config access.
Using a 302 (temporary) redirect for what's actually a permanent move, search engines keep the original URL indexed for a 302, so ranking signals never consolidate onto the new URL the way they would with a 301.
Deploying an HTML meta-refresh or JavaScript redirect when server-level access is actually available, both are slower (they require the page to load first) and less reliably followed by crawlers than a proper .htaccess or Nginx redirect.
Setting up the redirect code but never verifying it actually works after deploying, this tool generates the code, it can't check a live redirect on the internet, confirm it manually with your browser's network tab or a tool like curl after deployment.
Server-level redirects (.htaccess for Apache, or the Nginx config) are strongly preferred over HTML meta-refresh or JavaScript redirects, they happen faster, are more reliably followed by search engines, and don't depend on the page's HTML/JS loading first.
Mainly when you don't have access to server configuration, like on some static hosting or page-builder platforms. They work, but are slower and less SEO-friendly than a proper server-level redirect.
Google AdSense Banner
This area will contain advertisements after approval.