Redirect rule generatorTurn your URL list into server rules.
Paste your old and new URLs, and we'll prepare 301 redirect rules for Apache .htaccess, Nginx, Vercel, Netlify and Cloudflare. We shorten redirect chains and catch loops and conflicting lines before you publish.
Free, no account needed. Your data is processed in your browser and isn't sent to the server.
Preparing output…
Step-by-step guide
- Compile a list of old URLs. Good sources are the old site's sitemap, the pages exported from the Performance report in Search Console, and URLs that receive links from other sites. Every old URL that brings traffic or has links should have a counterpart on the new site.
- Paste the pairs. You can paste two columns straight from Excel or Google Sheets; a header row such as “eski / yeni”, “kaynak / hedef” or “old / new” is skipped automatically. You can write URLs as relative paths (
/hakkimizda.php) or in full; domain names without a protocol are completed withhttps://. The part of a URL that starts with#never reaches the server, so it isn't used for matching. - Choose the status code. For a permanent move, 301 is enough; choose 308 if the request method must be preserved on URLs that receive form submissions. The ready-made rules (HTTPS, www, slash, domain migration) are always written with a permanent code: 308 if you chose 308, 301 otherwise.
- Review the options. With “Preserve the query string” on, parameters such as
?utm_source=are carried over to the new URL. If you turn it off, the Apache and Nginx rules drop the parameter; Vercel and Netlify have no setting for this, so a warning appears. With “Shorten chains” on, an A → B → C chain is written as A → C. - Read the checks and choose your platform. The summary line gives the number of rules, chains and loops. Rows that create a loop, redirect to themselves or repeat an already written old URL with a different target aren't written to the output; the Checks list tells you which ones were skipped, by line number. Then pick your server from the tabs. Each tab has its own file name (
.htaccess,nginx-yonlendirmeler.conf,vercel.json,_redirects,cloudflare-toplu-yonlendirmeler.csv) and its own notes.
Don't skip the platform notes. On Vercel and Netlify, HTTPS and www redirects are a dashboard setting rather than a rule; the Cloudflare file leaves out old URLs with query strings; and in the Nginx output, more than 20 rules are moved into a map block that looks them up quickly.
Common problems and how to fix them
Unchanged URLs produce critical findings
When you paste a table containing all your URLs, pages whose URL hasn't changed produce the “Old and new URL are the same” finding, and rows where only http became https produce “Only the protocol changes”. Both would cause a loop on the server, so they aren't written to the output. Filter out unchanged rows before pasting the table, and for the HTTPS migration tick the “Redirect HTTP to HTTPS” ready-made rule instead of writing a rule for every row.
In WordPress the rules don't work or disappear
Every time the permalink settings are saved, WordPress rewrites the section between # BEGIN WordPress and # END WordPress, and any rules added there are deleted. Because the rule in that section sends every non-existent URL to the index.php file, redirects written after it often never run at all. Add your rules at the very top of the file, before the # BEGIN WordPress line. Open the site after saving the file; if you get a 500 error, mod_rewrite may be disabled on your server. Restore the old file and ask your hosting provider.
Old URLs with parameters don't match
For URLs like /urun.php?id=12, Apache's Redirect directive and Nginx's location block don't look past the question mark, so rules of this kind written by hand silently fail. For these rows the tool writes a RewriteCond %{QUERY_STRING} condition in Apache, a $request_uri comparison in Nginx and a has condition in Vercel. The Apache and Nginx rules require the query string to arrive exactly as written: an extra parameter (?id=12&utm_source=bulten) or a different order breaks the match. Cloudflare bulk redirects can't match on the query string at all, so these rows aren't included in the CSV; create a separate Single Redirects rule for them in Cloudflare.
A fixed redirect still goes to the old place in the browser
Browsers cache 301 and 308 responses and the next time redirect the same URL without asking the server. Even if you fix a permanent redirect you published with the wrong target, visitors who opened that URL before will go to the old target for a while. After publishing rules, test them in a private window or with the redirect checker; the tool sends every request from scratch. When moving a lot of URLs, publishing a few rules first and checking them limits the damage a wrong rule can do.
Example: moving old PHP pages and the blog
The “Fill with example” button loads a migration list for ornek-site.com. The list moves old pages with file extensions to clean URLs and the /blog/ folder, with its subpages, to the /yazilar/ folder; it also contains two rows left over from an earlier campaign move: /kampanya → /indirimler and /indirimler → /firsatlar.
The summary line reads “6 rules · chains: 1 · loops: 0”. Because “Shorten chains” is on, the Checks list contains the note “1 redirect chain collapsed into a single step”: /kampanya now goes straight to /firsatlar. The final finding, “6 rules ready”, says the output can be used. The rules in the Apache tab look like this:
RewriteEngine On
RewriteRule ^eski-sayfa\.html$ /yeni-sayfa [R=301,L]
RewriteRule ^hakkimizda\.php$ /kurumsal/hakkimizda [R=301,L]
RewriteCond %{QUERY_STRING} ^id=12$
RewriteRule ^urun\.php$ /urunler/deri-canta [R=301,L,QSD]
RewriteRule ^blog/(.*)$ /yazilar/$1 [R=301,L]
RewriteRule ^kampanya$ /firsatlar [R=301,L]
RewriteRule ^indirimler$ /firsatlar [R=301,L]
- Read the rules. Because one old URL has a query string, all rules were written as
RewriteRule. TheQSDflag doesn't carry theid=12parameter over to the new URL, while(.*)and$1carry the blog post's name into the new folder. - Look at the notes in the other tabs. The Cloudflare tab shows the warning “1 rule with a query string wasn't added to the CSV”;
/urun.php?id=12needs a separate rule. In the Netlify tab, the same row is written as/urun.php id=12. - Upload the rules. In Apache, add them at the very top of the
.htaccessfile in the root directory. - Test them. The button below the output opens the first old URL in the redirect checker:
https://www.ornek-site.com/eski-sayfa.htmlshould go to/yeni-sayfain a single 301 step and get a 200 there. Paste all old URLs as full addresses into the bulk status code checker and make sure no URL is left whose chain doesn't end in 200.
Frequently asked questions
What's the difference between a 301 and a 302 redirect?
301 and 308 are permanent redirects: search engines drop the old URL from the index, replace it with the new one and pass ranking signals to the new URL. 302 and 307 are temporary; the old URL stays in the index. 307 and 308 also preserve the method of POST requests such as form submissions. If the page has moved permanently, use 301.
Why are redirect chains a problem?
If URL A redirects to B and B to C, visitors wait twice. Googlebot follows at most 10 steps in a chain, but every step slows the page down, uses up crawl budget, and a single broken step makes the page unreachable altogether. This tool finds chains and redirects the old URL directly to the final target; loops are left out of the output entirely.
What should I watch out for when migrating a site?
Redirect each important URL on the old site individually to the new URL with the closest content; sending them all to the homepage counts as a soft 404 in Google. Keep the redirects in place for at least a year, and update your internal links and sitemap with the new URLs. If the domain changed, also use the Change of Address tool in Search Console.
How do I test the rules after uploading them?
Open a few old URLs with the Redirect checker to see each step's status code and the final target; test hundreds of URLs at once with the Bulk status code checker. Old URLs should redirect with a single-step 301, and new URLs should return 200. When creating new URLs, the URL slug generator converts Turkish and accented characters correctly.
Learn more about this topic: Redirect guide · Technical SEO checklist