Pages move. You rename a product, restructure a section, or retire an old URL in favour of a better one. The page itself is easy to move; the problem is everything pointing at the old address: bookmarks, links from other sites, search results, and the ranking history the old URL built up. Leave it answering with a not-found error and all of that is stranded.
The fix is a permanent redirect. This guide shows how to write one correctly with the free Redirect Rule Generator on Ovatly: one rule, the right status code, the right format for your server, pointed at the final destination, and tested live.
Contents
- Quick answer
- What a permanent redirect actually tells the world
- Why one rule, pointed at the final destination
- Choosing the format your server reads
- How to redirect an old page, step by step
- Worked example: one row, one Nginx rule
- Limitations and honest tradeoffs
- Common mistakes
- FAQs
- Conclusion
- References
Quick answer
To redirect an old page to a new URL: create one rule with status code 301, from the old path to the new path, in the format your server reads, deploy it, and visit the old URL to confirm you land on the new page in one hop. On Ovatly, open the Redirect Rule Generator, add a single from/to row, set its code to 301, and copy the output for .htaccess, Nginx or _redirects. One honest caveat belongs here, not buried: a 301 is the correct permanent signal, but it is a signal, not a guarantee. No tool or rule can promise that traffic or rankings are preserved exactly after a move.
What a permanent redirect actually tells the world
A redirect is an instruction a server gives when a requested URL no longer serves content: go to this address instead. The status code is the tone of voice. A 301 says the move is permanent, so browsers may cache the instruction and search engines should list the new URL in place of the old one. Temporary codes say the opposite: 302 and 307 mean the old address is still the real home and the detour will end.
That is why the code choice matters more than the syntax. Send a 302 for a move that is actually forever and you have told search engines to keep trusting an abandoned address. Send a 301 for a two-week detour and browsers may keep sending people to the temporary page long after it is gone. Match the code to the truth of the move.
Why one rule, pointed at the final destination
A moved page needs exactly one rule, naming the page's final home. The tempting shortcut, redirecting the old URL to wherever the content went last time it moved, creates the chain problem: the old address hops to an intermediate page that itself redirects onward. Every hop is extra delay and extra fragility.
So before writing the rule, answer one question: where does this content live now, finally? That address, and only that address, goes in the destination field. If the destination later moves again, update this rule rather than stacking another on top of it.
Choosing the format your server reads
The same rule wears three syntaxes, and the generator produces all of them from the same row. Apache servers read rules from a .htaccess file. Nginx servers take their own format in the server configuration; in Nginx output, 307 and 308 rows are emitted as exact-match location blocks with a return line, because the simpler rewrite form covers 301 and 302. Sites on Cloudflare Pages or Netlify read a _redirects file at the site root.
Picking the wrong format is a silent failure: the file sits on the server, nothing reads it, and the old URL keeps returning errors. If you do not know which format your site uses, check your hosting documentation before you deploy, not after.
How to redirect an old page, step by step
- Open the Redirect Rule Generator and add one row: the old path in the from field, the new path or full URL in the to field.
- Set the row's status code to 301 for a permanent move. Every row carries its own code, so permanent moves and temporary detours can share one list.
- Copy the output in your server's format:
.htaccess, Nginx, or_redirects. Regex characters in your from path are escaped automatically, so the path matches literally and cannot behave as a pattern. - Add the rule to your site and deploy. The generator validates the rule's shape, not its effect on your live server.
- Test it: request the old URL and confirm you land on the new page in a single hop.
Worked example: one row, one Nginx rule
A shop renames its soap page. The row: from /old-soap, to /soap, code 301. The Nginx output is one line:
rewrite ^/old-soap$ /soap permanent;
Read it left to right: requests matching the old path exactly get a permanent redirect to /soap. The permanent keyword is how Nginx spells a 301 in the rewrite form. The same row exported for Apache would live in .htaccess, and on Cloudflare Pages or Netlify it would sit as a plain line in _redirects, but the instruction is identical in all three: this page moved here, for good.
After deploying, the test takes ten seconds: type the old address and watch for one hop, settling on /soap. That observed hop is the only proof the redirect exists; the generated line alone is just a plan.
Limitations and honest tradeoffs
The central limitation is the one stated up front: a 301 promises a correct signal, not a preserved outcome. Search engines generally transfer most of a page's standing to its permanent replacement, but "generally" and "most" are doing real work in that sentence. Rankings can shift after a move for reasons unrelated to the redirect: the new page's content, its internal links, its speed. The guide's promise is the part you control: the right code, one rule, the final destination, verified live.
The tool's limits are narrower. It validates the shape of your rules only, and refuses a duplicate source path. It cannot test your server, follow your other rules, or warn you that the destination is itself redirected elsewhere. That check is yours: visit the destination and confirm it serves a real page.
Common mistakes
- Redirecting to the homepage instead of the replacement page. Visitors asked for specific content. Send them to its new home, not your front door.
- Using 302 for a permanent move. The code tells search engines the old URL is still canonical. Forever moves get 301.
- Pointing the rule at an intermediate address. If the destination itself redirects, you have built a chain. Use the final URL.
- Deploying the wrong format. A perfect rule in a file your server never reads does nothing.
- Skipping the live test. The generator checks shape, not your server. One visit to the old URL is the verification.
FAQs
Does a 301 redirect guarantee my traffic and rankings stay the same? No, and any tool or guide that promises that is overstating what a redirect does. A 301 is the correct permanent signal: it tells browsers and search engines the page has moved for good and the new URL is the one to use. How rankings settle afterwards depends on the new page and the wider site, which no rule can control. What you can control is sending the right signal, cleanly, once.
Which output format should I choose? The one your server reads. Apache sites use .htaccess, Nginx servers use the Nginx format, and sites on Cloudflare Pages or Netlify use the _redirects file at the site root. The rule itself is the same in each case; only the syntax around it changes.
What if the page has only moved temporarily? Use a temporary code instead: 302, or 307 if the request method must be preserved exactly. Save 301 for moves that are genuinely permanent, because browsers and search engines treat a 301 as a decision that will not be reversed.
Why did the generator refuse the row I entered? Almost certainly because that source path already has a rule. One source cannot hold two redirects, so the generator refuses the duplicate rather than guess which destination you meant. Find the existing rule for that path and edit it instead.
How do I know the redirect actually works? Visit the old URL after deploying. You should land on the new URL in a single hop, with the address bar showing the destination. If you bounce through another address on the way, the rule points into a chain and needs its destination updated to the final page.
Conclusion
Redirecting a moved page well is a small job with a short checklist: one rule, code 301, the final destination, your server's format, and a live test. The Redirect Rule Generator turns the row into correct syntax for .htaccess, Nginx or _redirects; the rest is the discipline of pointing it at the right place. When rules accumulate, audit the whole list with Redirect Chains and Loops: How to Spot Them in a Rule List. More guides in this series live in our Website and Webmaster Tools guides.
References
- MDN Web Docs, on HTTP response status codes, including 301 and the temporary codes: https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Status
- MDN Web Docs, on how HTTP redirections work in practice: https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/Redirections