I am running two different version of my application. One for mobile devices and the other for desktop computers. SEO is a very important topic for us, as we are an online shop that needs to be found in the web.
www.test.com on a small screen device, the user gets redirected to
www.m.test.com. The other way around works the same. The application is built with NextJS, if that matters.
Do I need to add for both versions a sitemap.xml and robots.txt? How do I work with canonical tags?