Nginx Redirect Generator
Create Nginx 301 and 302 redirect rules, force HTTPS and choose www or non-www, ready to paste into your server block.
📘 New to this tool? Follow the step by step guide with screenshots.
Quick answer: The Nginx Redirect Generator turns your redirects, domain, type and preferred host into ready to edit text. Fill in the fields and the result appears straight away. It is free, needs no account and runs in your browser, so nothing you enter is saved on a server.
On this page
What is the Nginx Redirect Generator?
Create 301 and 302 rewrite and return rules, force HTTPS and www or non-www redirects for Nginx servers. It is built for site owners, developers and SEOs who look after crawling, indexing and site health.
How do you use the Nginx Redirect Generator?
- Paste your text into Redirects.
- Enter Domain (example: example.com).
- Choose Type (example: 301).
- Choose Preferred host (example: Non-www).
- Read the result, then copy or download it.


For a fuller walkthrough, see the step by step guide to the Nginx Redirect Generator.
Which inputs does the Nginx Redirect Generator use?
| Input | Type | Example value |
|---|---|---|
| Redirects | Text box | /old-page/ | https://example.com/new-page/ |
| Domain | Text | example.com |
| Type | Menu | 301 |
| Preferred host | Menu | Non-www |
What does a worked example show?
Using Domain example.com, Type 301 and Preferred host Non-www, the tool shows: # Redirect http and the other host to https://example.com server { listen 80; listen [::]:80; server_name example.com www.example.com; return 301 https://example.com, $request_uri; } server {…. Swap in your own input to get your own result.
Where to paste it
Add the rules to your site’s server block, usually in /etc/nginx/sites-available/, then test with nginx -t and reload Nginx.
Key terms
- 301 redirect
- A permanent redirect that sends users and search engines from an old URL to a new one. It passes most ranking signals to the new address, which makes it the standard choice when a page moves or two pages are merged.
- Search engine optimisation
- The practice of improving a website so it ranks higher in unpaid search results. It covers technical health, on-page content, links and user experience, and it follows Google Search Essentials rather than shortcuts.
- Browser based tool
- A tool that runs entirely in your web browser with JavaScript, so the data you enter is processed on your own device. It works instantly without sign up, but it cannot fetch other websites because of browser security rules.
How we checked this tool
We tested the Nginx Redirect Generator in Chrome on 2 November 2026 with the example inputs shown above and checked the output by hand. It runs in your browser and does not store what you enter. Read our editorial policy, disclaimer and privacy policy, or report an error on WhatsApp.
Frequently asked questions
What does the Nginx Redirect Generator do?
Create 301 and 302 rewrite and return rules, force HTTPS and www or non-www redirects for Nginx servers.
Who should use the Nginx Redirect Generator?
The Nginx Redirect Generator is made for site owners, developers and SEOs who look after crawling, indexing and site health. It is simple enough for beginners and quick enough for agencies that run the same check many times a week.
Is the Nginx Redirect Generator free?
Yes. The Nginx Redirect Generator is free with no account, no daily limit and no watermark, and it sits alongside more than 500 other free tools on this site.
Does the Nginx Redirect Generator save my data?
No. All processing happens in your browser with JavaScript. The values and text you enter stay on your device and are not sent to or stored on our server.
How reliable are the results?
The output is a starting draft. Review and edit it so it is accurate and sounds like you before you publish or send it.
Where can I learn more about the Nginx Redirect Generator?
Read the step by step guide with screenshots, linked above, or browse the other free technical seo tools for related checks.
Sources: Google crawling and indexing documentation and Google SEO Starter Guide, checked 2 November 2026.