A 301 redirect is a way to move traffic to a new site without taking a hit to your SEO rankings. The 301 redirect and is the most popular kind of redirect and nearly always the best method. Using NGINX means the that the server redirects the page efficiently and independently of your Content Management System (CMS).
- Log into your control or Plesk panel
- Navigate to Websites & Domains > Your Subscription > Apache & nginx Settings
- Scroll down to the "Additional nginx directives" section
Add the following code to the text box provided, using the target domain instead of example.com
return 301 https://example.com$request_uri;
- Click "Ok" to apply and save.