ADMISSIONS OPEN
🔥 Admissions Open • Book Your FREE Digital Marketing Demo Class • Limited Demo Slots Available • 🚀 Start Your Digital Marketing Career Today • 💼 Practical Training + Career Guidance • 🎯 Reserve Your Seat Before Today's Slots Fill
Book FREE Demo

Nginx Redirect Generator

Create Nginx redirect rules from a list of old and new URLs, plus HTTPS and www server blocks. Copy clean configuration that is ready to add to your site's server block.

How to add Nginx redirects

  1. List each redirect as old path | new URL.
  2. Add server blocks if you also need HTTPS and www redirects.
  3. Paste the page rules inside your site’s main server block.
  4. Test with nginx -t, then reload Nginx and check each old URL.
nginx redirect generator steps

Nginx redirect methods

MethodUse for
location = /path { return 301 ... }One exact page
location ^~ /folder/ { return 301 ... }Everything in a folder
server { return 301 https://...$request_uri; }Whole domain, HTTPS or www changes
rewrite ^/old/(.*)$ /new/$1 permanent;Pattern-based moves that keep part of the path

Shared hosting?

Most shared hosts in India run Apache or LiteSpeed, where you edit .htaccess instead. Use the htaccess redirect generator for those. If your host gives you no server access, use your SEO plugin’s redirect manager.

Find chains in your redirect list with the redirect chain checker, look up codes in the HTTP status codes list, and plan moves with the site migration checklist.

More free tools and guides

More free tools like this nginx redirect generator
Learn this hands-on

Practise tools like this on real projects in our digital marketing course in Faridabad, with weekday, weekend and online batches.

See the courseAll free toolsAsk on WhatsApp
nginx redirect generator FAQ

Frequently Asked Questions

Is this Nginx redirect generator free?

Yes. It is free with no sign-up and works in your browser.

Should I use return or rewrite in Nginx?

Use return for simple redirects. It is clearer and faster. Use rewrite only when you need patterns.

Where is the Nginx config file?

Often in /etc/nginx/sites-available/ or /etc/nginx/conf.d/, depending on your server setup.

Does a 301 in Nginx pass SEO value?

Yes. A 301 redirect signals a permanent move, and search engines transfer signals to the new URL.

Scroll to Top