I'm changing a company name and need to switch from domain1.com to domain2.com. All of the URLs on domain1 have a corresponding URL on domain2. Both domains are on cPanel hosting.
I want to forward all www.domain1.com URLs to the equivalent www.domain2.com URL. For example www.domain1.com/faqs should forward to www.domain2.com/faqs. Parameters in the URL (ie ?var=xxx&var2=yyy) should also forward.
I do not want to forward other subdomains. The MX records for email are handled by a different server and should not forward. It may be worth noting that the .htaccess file is used to force www (ie domain1.com/faqs forwards to www.domain2.com/faqs) and that DNS management is handled through the Cloudflare CDN service.
What would be the best way to set-up the forwarding? I'd prefer to eventually close the domain1 cPanel account, but I also do not mind keeping it since it costs me nothing to do so.