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


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

This function is built into Magento2 already, guide below:


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.