New: 500+ free SEO and AI search tools, no sign-up.Explore tools β†’

How to Use the Nginx Redirect Generator (Step by Step Guide)

By Hasnain Sanmal
Nginx Redirect Generator: how to fill in the tool

This guide explains how to use Nginx Redirect Generator, step by step, with screenshots of the real tool. It is written for site owners, developers and SEOs who look after crawling, indexing and site health. Create Nginx 301 and 302 redirect rules, force HTTPS and choose www or non-www, ready to paste into your server block.

Quick answer: To use the Nginx Redirect Generator, open the free tool, paste the redirects, enter the domain, choose the type and choose the preferred host, then copy the text it creates. Everything runs in your browser, so there is no sign up and nothing you type is stored on a server.

how to use Nginx Redirect Generator: Nginx Redirect Generator with example inputs
Screenshot of the live Nginx Redirect Generator with its example values.

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.

Add the rules to your site’s server block, usually in /etc/nginx/sites-available/, then test with nginx -t and reload Nginx.

How to use Nginx Redirect Generator step by step

  1. Step 1: Open the Nginx Redirect Generator

    Go to the Nginx Redirect Generator on hasnainsanmal.com. It loads with example values already filled in, so you can see how it works straight away. It works the same way on a phone, tablet or computer.

  2. Step 2: Paste Redirects

    Paste or type your text into Redirects (old path | new URL). The example starts with: /old-page/ | https://example.com/new-page/.

  3. Step 3: Enter Domain

    In the Domain box, type your own value. The example uses example.com, which you can replace.

  4. Step 4: Choose Type

    Choose an option from Type. Options include 301 and 302. The example uses 301.

  5. Step 5: Choose Preferred host

    Choose an option from Preferred host. Options include Non-www and www. The example uses Non-www.

  6. Step 6: Read the results

    The output appears inside the tool card. Change any input to compare different scenarios.

    Nginx Redirect Generator results example
    Screenshot of the Nginx Redirect Generator results.
  7. Step 7: Copy or download the output

    Use Copy to take the result into your document, CMS, spreadsheet or report.

What does each field in the Nginx Redirect Generator mean?

Field What to enter Example
Redirects Text, one item per line where asked /old-page/ | https://example.com/new-page/
Domain Your text example.com
Type Choose one option (301, 302) 301
Preferred host Choose one option (Non-www, www) Non-www

What does a worked example look like?

With the example inputs (Domain: example.com, Type: 301 and Preferred host: Non-www), the Nginx Redirect Generator returns: # 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 { listen 443 ssl;…

Replace the example with your own input to get your own result, then review it before you use it.

How do you get the best results from the Nginx Redirect Generator?

  • Re-check after every theme, plugin or server change.
  • Confirm fixes in Google Search Console with URL Inspection.

For background, read the Google crawling and indexing documentation. If you are working on a related task, our guide on how to use the Sitemap Index Generator walks through it the same way. You can also browse all free Technical SEO Tools.

What mistakes should you avoid with the Nginx Redirect Generator?

  • Testing on a staging copy and forgetting that the live site has different rules.
  • Fixing one URL and not checking the template that created the problem.
  • Changing URLs without adding 301 redirects.

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.

Related free tools

Frequently asked questions

Is the Nginx Redirect Generator free to use?

Yes. The Nginx Redirect Generator is completely free, with no sign up, no daily limit and no watermark. It is one of more than 500 free SEO and marketing tools on hasnainsanmal.com.

Is my data stored when I use the Nginx Redirect Generator?

No. The Nginx Redirect Generator runs in your browser with JavaScript, so the values and text you enter are processed on your own device and are not sent to or saved on our server.

How accurate is the Nginx Redirect Generator?

It creates a solid first draft from your inputs. Always review and edit the output so it is accurate, specific and sounds like you before you publish or send it.

Does the Nginx Redirect Generator work on a phone?

Yes. The tool is built for screens from 360 pixels wide, so you can use the Nginx Redirect Generator on a phone, tablet or computer in any modern browser.

Can I use the Nginx Redirect Generator for client work?

Yes. You can use the results for your own sites and for client projects. Check the output first, and keep a note of the inputs you used so you can repeat the check later.

What should I do after using the Nginx Redirect Generator?

Apply the result on your page, campaign or document, then measure the effect. If you would like expert help, see the SEO services or message Hasnain on WhatsApp for a free recommendation.

How we checked this guide: every step and screenshot was taken from the live Nginx Redirect Generator on 2 November 2026. Further reading: Google SEO Starter Guide.

Hasnain Sanmal
Hasnain Sanmal

SEO and guest post outreach specialist with 2000+ completed orders and a list of 1000+ hand-picked, high-authority websites. More about me

Need high-authority backlinks?

Get niche-relevant guest posts from my own outreach list of 1000+ websites.

Chat on WhatsApp

More to read

All articles