How to use
- 1Add old → new URL pairs, or pick a preset: domain move, http → https, www ↔ non-www.
- 2Choose 301 (permanent) or 302 (temporary).
- 3Open the tab for your platform: Apache, Nginx, IIS, Cloudflare, Netlify, Next.js, PHP or HTML.
- 4Copy the code into your config file, deploy and verify with the redirect checker.
Which redirect type to use
Use 301 for anything permanent: changed URLs, deleted pages with a close replacement, HTTPS migration, domain changes, www/non-www consolidation. Search engines transfer ranking signals and replace the old URL in the index. Use 302 only for genuinely temporary situations, like a seasonal page or A/B test. Browsers cache 301s aggressively, so test with 302 first if you are unsure, then switch.
Server-side beats meta refresh and PHP
Server config rules (.htaccess, Nginx, IIS, platform redirect files) run before any page loads and are the fastest and most reliable. PHP header redirects work when you can’t touch server config but need to run before any output. An HTML meta refresh is the last resort: Google treats an instant (0-second) meta refresh roughly like a permanent redirect, but it is slower and some tools don’t follow it.
Migration checklist
Map every old URL to its closest new equivalent — redirecting everything to the homepage is treated as a soft 404 and loses the value of those pages. Avoid chains by pointing old URLs straight at final destinations. Update internal links and the sitemap to the new URLs. For a domain change, also use Search Console’s Change of Address tool, and keep the redirects live for at least a year.
Frequently asked questions
Where is the .htaccess file?
In your site’s document root (often public_html). It is hidden — enable “show hidden files” in your file manager or FTP client. Apache must have mod_rewrite and AllowOverride enabled.
Is a 301 redirect bad for SEO?
No — it is how you preserve SEO when URLs change. Problems only come from chains, loops, or redirecting to irrelevant pages.
How do I redirect http to https and non-www to www in one hop?
Use the combined preset: it sends every variant directly to https://www (or the non-www version you choose) in a single redirect.
Does Nginx support .htaccess?
No. Nginx rules go into the server block of your site configuration; reload Nginx after editing.
Not happy with the results?
Talk to Webin Agency about fast, SEO-friendly websites, e-commerce and Google Ads management.