Doing Site Redirect With NGinx

nGinx is quick turning into one of one of the most popular web servers around, as well as it’s not surprising that why.,/ p >

It’s lightning quickly, runs of the smallest of servers as well as can manage a tsunami of traffic.,/ p >

So what is a website redirect?

It’s simply sends web traffic from one URL to another URL, without the customer needing to click any type of links in the center.

So allows claim we intend to redirect all web traffic mosting likely to our old website (lets call it to our brand-new site (lets call its, we would configuration a redirect on to send out all the website traffic instantly to

There are two main types of web site redirects (in Search Engine Optimization terms).

There is a permanent redirect (typically called the 301 redirect). This informs the internet search engine and even more modern-day internet browsers that whenever we see this URL immediately treat it as a different LINK

So in out example above, if we placed a 301 redirect on, the internet browsers as well as internet search engine would merely replace with and also generally act as if does not exists any longer.

A temporary or 302 redirect, says to the internet browsers as well as internet search engine that the web link location may transform, so don’t immediately do a substitution.

Let’s claims you have a company blog as well as you established a redirect to the current newspaper article.

So something like is a redirect to (2021-07-03 is the day of writing). I desire this latest_news to send individuals to the newspaper article, but when a more recent post appears, I desire it to reroute tp the newer post instead.

So allow’s make these redirect utilizing nGinx, utilizing the instance offered over.

Some where near the begin of your conf data in your/ etc/nginx/conf. d/ folder, put the adhering to line:

web server news

So you can see that producing nGinx redirect web links is quite basic and the best component is you don’t need to create any code, install any difficult plugins or mess concerning with data sources.

Just use the power of nGinx to make your life less complicated.

Bruce Hearder is an expert front end internet programmer. Figure out even more at []