Login issues on WordPress Multisite and domain mapping

I followed the instructions in the post I mentioned and that resolved the cookies error on logging in – but as I mentioned the sites would now not resolve using non-www. Subsites redirected to a registration page. This turned out to be an issue with htaccess file, but on adding the required rules the subsites still redirected to main site for non-www.

It turned out, based on previous (incorrect?) advice I had the www in Site Address (URL) Sites -> Edit Site -> Info.

I removed www from this setting. Now the sites were available wether you typed in www or not – but it always resolved to the non-www url.

Then I went into Sites -> Edit Site -> Settings and changed the Siteurl and Home address to be with www.

I had previously read that all three settings should be the same, but this is the only method that worked for me if I wanted www url to be the primary url and for both www and non-www to be available.

I would love to hear what people’s thoughts on this are – or what methods you are using to domain map on multisite with www as primary.