There are cases when you want to change page URLs or disable some page and avoid 404 error. For this, you need to create 301 redirects.
In order to add 301 redirect in Magento 2 please do next:
1. Go to Admin Panel > Marketing > SEO& Search > URL Rewrites.
2. Then press the Add URL Rewrite button.
3. Enter URL Rewrite Information
3.1. Choose "Custom" in Create URL Rewrite select box.
3.2. Choose the store view you want the URL Rewrite to be added to in the Store field.
3.3. Set the path you want to be redirected in the Request Path field.
3.4. In the Target Path, you correspondingly set the path you want the old one to be redirected to.
3.5. Choose Permanent(301) in the Redirect Type field.
3.6. Enter short information why you add this rewrite in the Description text box (optional).
Attention! Do not enter either domain nor store view code in the request and target paths.
4. Once you have finished with the rule configurations don't forget to save it by pressing the Save button.
5. Done :-)