I usually prefer the non-www URL for my website (http://learni.online , not http://www.learni.online ). But Google considers www and non-www version as two different websites, so we need to submit both URLs in the Google webmaster tools to index both the links in Google. Then we can set a preferred version of the URL in Google webmaster tools, which in my case is the non-www version of the URL.
But then you need to submit sitemaps that lists only your preferred version of the URLs. And there I am facing problem.
My sitemaps are listing the links in www version.
How should I instruct the programs to generate sitemaps without www in the URLs? Please help.