I have deployed my Hugo website two weeks ago using Netlify. I have bought a custom domain lets call it
"xyz.com". I have set up my hosting provider to work with both
www.xyz.com is the primary domain .i.e. all requests get redirected to
www.xyz.com). In my
hugo.toml, I have set the base URL to
The website has no issues, but Google Search Engine has indexed only like 5-6 web pages having the www subdomain and the pages without the www subdomain have not been indexed. Am I doing something wrong here? should I change the base URL? I don’t understand. Why is Google mixing up www and non-www.
Also, I checked the
sitemap.xml created by Hugo, All the links are non-www. I have submitted the sitemap to Google Search Console, but Instead of indexing the non-www URLS, my www URLs are indexed (that too not all the pages).