From Magento 2 backend, store admins can auto-generate a permanent product redirect whenever the URL key of a product changes. To apply the URL Redirect, let mark Create Permanent Redirect for Old URL checkbox that apppears beneath the Search Engine Optimization section. At that time, your store is already ready to set for the automatic product redirects as updating the URL key.
Stores > Settings > Configurations.
Search Engine Optimzationsection.
Create Permanent Redirect for URLs if URL Key Changedfield.
Save Configto complete.
Products > Inventory > Catalog.
URL keyfield, do these next steps:
Create Permanent Redirect for old URLcheckbox.
URL Keyas needed with all lowercase characters and hyphens excepting for the spaces.
Cache Managementlink in the system message to flush the cache and idex. Right after that, the permanent redirect is enabled for the product and any associated category URLs.
Ref: Magento 2 User Guide
It comes to the end of tutorial: How to Automatic Product Redirects in Magento 2.
Want to apply these above Invoice templates for your store?