Magento – Magento 2: 301 Redirects

301-redirectmagento2url

How would I create 301 redirects from my old domain URLs to my new M2 site URLs?

Best Answer

There are a few ways:

  • In the .htaccess or VirtualHost configuration of Apache or nginx
  • A Router observer in Magento that maps a regex of particular patterns to rewrite to the new Magento location from your legacy application's URL
  • Create records in the core_url_rewrite table
Related Topic